Access Query

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.
 
G

Golfinray

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"
 
D

Douglas J. Steele

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 & "*"
 
Top