Access Query

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

I am trying to write a query that will search for words in a paragraph. I
would like the text to come from a text box on another form. I am familiar
with how do do this for a normal query, but how do you do it to find only the
word or words entered in that field.
 
In the query criteria, use the the Like command. If you were looking for
health you would put Like "health", or if looking for dogs Like "dogs". You
can also use an OR command Like "health" or "dogs"
 
Not quite. You'd need to put Like "*health*" (or Like "%health%" if you're
using ADO). WIthout the wildcard characters, it's no different than using an
equals sign.

As a query criteria, you'd use

Like "*" & Forms!NameOfForm!NameOfTextbox & "*"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top