Results 1 to 3 of 3
  1. #1
    Al77 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    20

    Question Filtering Query for ANY of multiple fields?

    Can anyone tell me how to design a Query whereby the results produced are records where ANY of the Criteria entered in a number of fields are satisfied?

    Normally, all criteria have to be met (as I understand it) - can I design it so that only ONE (any) of a series of entered criteria in DIFFERENT fields are met?

    For example, I have to enter codes in three fields but would like to do a single search / Query for a code in ANY / ALL of those three fields.

    I hope this makes sense.



    Thanks

    Al

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Have you tried using OR instead of AND in the criteria?

    Select a,b,c from Table
    where
    a1 <7 OR Crit2 >200 OR crit3 <>"T"

  3. #3
    Al77 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    20
    I thought that only worked for SINGLE field criteria.

    How do I make that work for multiple fields / entries?

    Al


    Just solved it, didn't realise that you could stagger the criteria across fields.

    Thanks for answering anyway!

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

Similar Threads

  1. Replies: 1
    Last Post: 08-09-2011, 11:13 AM
  2. Multiple count of query fields
    By BLD21 in forum Queries
    Replies: 2
    Last Post: 05-23-2011, 01:09 PM
  3. SUM Multiple fields in a query
    By Thoudus in forum Queries
    Replies: 3
    Last Post: 02-24-2011, 09:11 AM
  4. Multiple filtering options in vba
    By eww in forum Programming
    Replies: 2
    Last Post: 09-28-2010, 01:46 PM
  5. Replies: 1
    Last Post: 06-28-2010, 11:04 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