Results 1 to 4 of 4
  1. #1
    BBurg859 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2011
    Posts
    2

    help with query

    I'm fairly new to using Access. I have a query that needs to select a field that can have multiple values. Here is an example: The field in question can have "General", "Functional", "Test 1", "Test 2", or the field can be blank. I would like for my query to select "Functional" over the other values if it exists, otherwise select "General". If the value is blank, I would still need the query to return a blank value. Any help would be appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Not sure what you want. You want only records with 'Functional' or Null unless 'Functional' is not in any records, then search for 'General'?
    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
    BBurg859 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2011
    Posts
    2
    Sorry, I should have been more specific. I guess what I'm looking for is something like If "Functional" Then "General" Else "Is Null". But I'm not sure how to enter that in the Criteria. Order of priority is "Functional", "General", "Is Null".

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    There is no 'prioritizing' filter criteria. A multi-criteria clause of " 'Functional' Or 'General' Or Is Null " will retrieve records that meet ANY one of those values, doesn't matter what order the valus are listed.
    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.

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

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