NOT Operator

K

K Gibson

I'm having trouble using the NOT LIKE operator. I have a
query that's comparing a table to a list I've made. I
want it to pull all of the records on my list, but I have
some that shouldn't be pulled as well. In that field I'm
using the NOT LIKE operator. If I put a single criteria
in the criteria field, it works fine. If I put multiple
criterias in the criteria field (seperated by an OR) it
leaves all of the NOT LIKE criteria in the list. I have a
feeling it's just a typographical error, but I'm lost!!

Any help on how to make this work would be great!!!

Thanks,

Kevin
 
G

George Nicholson

Kevin:

Don't use OR, use AND.

If you are using statements similar to "NOT 'Apple' OR 'Orange'", EVERYTHING
will return True. When using OR, the only way for anything to return False
(and be excluded from your results) is if it is BOTH Apple and Orange, and
that isn't likely :). You are getting all records because every record
passes one of the 2 OR conditions.

If you change the OR to AND, then it will return only those records where
both conditions are met: things that aren't Apple *and* aren't Orange.
 
K

Kevin G

George,

This works perfectly now. Thanks for your quick reply and
great help!!!

Kevin G
 
Top