Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Multiple Criteria in Query Not Working with Or
Gary Becker 
     
10 months ago
I'm wondering what I'm doing wrong. I want to NOT include any Transaction Type that is "Dollars Paid" or "Cash Receipt". If I do only one of those it works. If I add the 2nd criteria to the grid neither works--it includes both of them in the results.
Gary Becker OP  @Reply  
     
10 months ago

Adam Schwanz  @Reply  
           
10 months ago
That's because of the OR and <> means Cash Receipt is OK for showing Dollars Paid, and Dollars Paid is ok with showing Cash Receipt.

Instead do it on one line, <>"Dollars Paid" and <>"Cash Receipt"
Sami Shamma  @Reply  
             
10 months ago
Post the SQL for this query.
Adam Schwanz  @Reply  
           
10 months ago
Another way to think of it is if we pretend only 5 numbers exist, 1-5
<>1 would say its ok to show 2,3,4,5
OR
<>2 would say its ok to show 1,3,4,5

Thus you get everything, 1,2,3,4,5
Gary Becker OP  @Reply  
     
10 months ago
Thanks. I've struggled with this and never could figure out WHY. My brain was say show everything that doesn't equal (this) or (this) And it looks like the keyword is AND instead of OR.
Gary Becker OP  @Reply  
     
10 months ago
This is the SQL that works.
Gary Becker OP  @Reply  
     
10 months ago

Alex Hedley  @Reply  
           
10 months ago
AND across
OR down
Stanley Mc Keown  @Reply  
     
10 months ago
Another thanks to Adam as this is useful to know and I haven't had the cause to use it yet but may do in the near future so just bookmarking this thread.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 4:43:01 PM. PLT: 0s