Multiple Not Like statements in query

Experts,

I have a data set of about 600,000 records that I've imported into Access. My requirement is to exclude records that have any words in a description field that exist in a list of 20-40 exclusion keywords.   I'm thinking of managing the list of exsclusion keywords on a form connected to a table... tblKeywords. How would I write a query that would read the table values and create a query criteria such as
Select * FROM tblData
WHERE tblData.description not like 'A', or not like 'B' or not like 'C' etc.

Would I need to use VBA to rip the values from the keyword table?
Is there a limit to how many Not Like expressions i can put in a statement?
Not sure how to do this...

For the sake of clarity, if my keywords are Flowers, Funeral, Party, Birthday, Cake, etc, then i want to exclude any records that have any of these words in the description field.
So
"Retirement Party for Joe" - exclude
"Flowers for hospital visit" - exclude
"Legitimate Expense" - include

The simplest solution would to have a very long WHERE NOT LIKE expression. But, we'd like to be able to have a non technical person manage the list so hence, managing it on a form
thanks
RonBudget AnalystAsked:
Who is Participating?
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.

n2fcCommented:
Read up on De Morgan's law!   https://en.wikipedia.org/wiki/De_Morgan%27s_laws

If you need to string out your "nots"  you need to use AND instead of OR!

NOT (A or B or C)   becomes NOT A and NOT B and NOT C!!
0

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
Gustav BrockCIOCommented:
If the keyword always will be the first word, you can filter these out like this:

Select *
From YourTable
Where RTrim(Left([Description], Instr([Description], " "))) Not In (Select KeyWord From tblKeywords)

Open in new window

With 600,000 records you may wish to add some other filtering as well.
1
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.