Results 1 to 8 of 8
  1. #1
    fiveupnorth is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2017
    Posts
    5

    Returning multiple criteria query result

    Hello.



    I work for a non-profit and I have a query where I need to return all Gift Types. The exception is we only want Pledge Gift Type that are greater than $1000.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	14.7 KB 
ID:	31700

    Anyone able to help me?

    Kim

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Do this on two Criteria lines:

    1. One the first one, under "Gift Type", enter:
    Code:
    <> "Pledge"
    2. On the second criteria row, enter this under "Gift Amount"
    Code:
    > 1000

  3. #3
    fiveupnorth is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2017
    Posts
    5
    When I added that it returned only Gift Amounts greater than 1000 (there are many less than that I need to show up) and it did not return the Pledges even though they were >1000.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	19.7 KB 
ID:	31705

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You put both on the same Criteria row. As I said, they must be put on TWO (different) Criteria rows (notice all the blank rows they give you!).
    See here for a visual example: https://support.office.com/en-us/art...C-7E37189EDE88

    The way that Access works, is multiple conditions placed on the same row are treated as "AND" conditions, while ones put on different rows are treated as "OR" conditions.

  5. #5
    fiveupnorth is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2017
    Posts
    5
    I see! Thank you.

    Last question, can you have two AND Conditions and one OR? I have one other parameter and that is deceased is equal to No. When I add the two above, by deceased donor appears on the report.

    Thanks again!

  6. #6
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You certainly can, but it needs to be well thought-out.
    If you are adding "exclusions", you need to look at every row where you have conditions. If the condition on that line does not already exclude that person, you need to add the exclusion to that row.
    It may mean adding the exclusion to every row that you have conditions.

  7. #7
    fiveupnorth is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2017
    Posts
    5
    Got it to work. Thanks again.

  8. #8
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome.

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

Similar Threads

  1. Replies: 1
    Last Post: 08-21-2017, 03:07 PM
  2. Replies: 4
    Last Post: 02-11-2016, 02:34 AM
  3. Replies: 6
    Last Post: 01-02-2016, 02:54 AM
  4. Replies: 2
    Last Post: 05-30-2012, 07:53 AM
  5. Query Criteria not returning any records
    By SgtSaunders69 in forum Access
    Replies: 2
    Last Post: 12-19-2011, 07:45 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