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???
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vpopperAuthor Commented:
Also, there could be different variations of the vendor name - this is why I used the *
ie. Pharmedium, Pharmedium LTD, Pharmedium Company
Not Like "FFF*" Or Not Like "PHARMEDIUM*"
1. You need to understand Boolean logic.  a <> b or a <> c is ALWAYS true because a cannot be equal to both b and c at the same time unless b and c are equal to each other.  To make this work, you need to use AND rather than OR as the relational operator because you want BOTH statements to be true, not just one of them.

2. I see that you are using the * as a wild card but I just wanted to emphasize that you should NOT use LIKE when you actually have a complete value because in many cases LIKE forces a full table scan and prevents the query engine from optimizing the query.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vpopperAuthor Commented:
I tried that already and did not work  I solved by using this:
Not Like "FFF*" and Not Like "PHARMEDIUM*"

IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

vpopperAuthor Commented:
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.
Tony PittCommented:
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.