Link to home
Create AccountLog in
Avatar of vpopper
vpopperFlag for United States of America

asked on

How do I make two conditions in an Access Query

Not Like "FFF*" Or Not Like "PHARMEDIUM*"

I am trying to exclude two vendors from an access query.  If I do a not like for one or each of these, it seems to work but if I combine, it does not.  I tried () but not sure I am placing correctly.  Can any one suggest a change above that would work for both when running???
Avatar of vpopper
vpopper
Flag of United States of America image

ASKER

Also, there could be different variations of the vendor name - this is why I used the *
ie. Pharmedium, Pharmedium LTD, Pharmedium Company
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of vpopper

ASKER

I tried that already and did not work  I solved by using this:
Not Like "FFF*" and Not Like "PHARMEDIUM*"

Thanks
Avatar of vpopper

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for vpopper's comment #a40649826

for the following reason:

Solved this myself
Isn't that what I said?  You may have solved it yourself also, but you did get the correct answer from my post.
Avatar of Tony Pitt
Tony Pitt

If you want to combine two negated conditions, then you need to negate a combined condition.  So what you want is something like "Not (Like "FFF" or Like "PHARMEDIUM").  Note that the brackets are important here.

/T