Results 1 to 3 of 3
  1. #1
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    132

    Do not return fields in a query if there is not data

    Hello!

    How do I tell a query to not return a field if there is no data in the field for the records. I know it probably has something to do with null but I'm not sure how to phrase the expression.

    Thank you, in advance.


    Michael

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,226
    Query doesn't work that way. Fields cannot be dynamic (not considering CROSSTAB). Field is either included or not included, can't be conditional.

    Can construct a field with expression that will return alternate value if native field is null. But that is still a field in query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    132
    Quote Originally Posted by June7 View Post
    Query doesn't work that way. Fields cannot be dynamic (not considering CROSSTAB). Field is either included or not included, can't be conditional.

    Can construct a field with expression that will return alternate value if native field is null. But that is still a field in query.
    Thank you. I finally accomplished what I was after by creating 3 separate GeneraID_FK fields. Not ideal but it works.

    Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 02-22-2019, 07:23 PM
  2. Replies: 2
    Last Post: 06-13-2018, 03:59 AM
  3. Replies: 5
    Last Post: 11-03-2014, 03:06 PM
  4. Replies: 3
    Last Post: 09-06-2014, 01:25 PM
  5. return data for similar fields
    By kwooten in forum Queries
    Replies: 5
    Last Post: 08-06-2013, 02:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums