PDA

View Full Version : Solved: Multiple Criteria Check



austenr
10-11-2006, 07:14 PM
I am trying to check for multiple criteria to exclude those records in a design view query. For instance I want to exclude records for a field that are <> "Jones" or <>"Smith". I have tried to do just one and it ends up including the records anyway. I have even tried using the builder when you right click or criteria.

What is the correct way to exclude the above? I can do it in SQL Server but need it to work in ACCESS. Thanks. :banghead:

Jacob Hilderbrand
10-11-2006, 07:36 PM
Wouldn't all records be <> "Jones" or <> "Smith ? I mean the records can't be both. Or should it be And?


<>"Jones" And <>"Smith"

OBP
10-12-2006, 02:48 AM
I agree with DRj, it should be "and" not "or". What I don't understand is why they do not work individually, I have just tested it and it work fine.
It would suggest that the records are not actually "Smith" and "Jones" but have blank spaces or something on the end of the names.
To test this try
not Like "Smith" & "*"