Return exact term only

G

Guest

I'm using query builder to look for all records in a column that contain the
word "free"
I'm using *free* in the criteria line which returns records containing
"free" but also "freedom" "freely" etc.
I tried "*free *" (a space after free) that doesn't work since it doesn't
return any records that end with the word free.
Any help with just finding the word and not words containing the word would
be much appreciated.
thanks
 
G

Guest

Try

Where FieldName Like "* free *" Or FieldName Like "free *" Or FieldName Like
"* free"
 
J

John Spencer

If you want a word in the query, then you need to define how a word is
delimited.
This has the word free in it.
The offer is free/nominal.
Free!

Those all might qualify. If just spaces defines the words then
Where FieldName Like "* free *" Or FieldName Like "free *" Or FieldName Like
"* free"
works well.
If you allow spaces and other punctuation marks to define the word then you
might use something like
WHERE " " & FieldName & " " LIKE "*[ -/:-@]" & [Find Word] & ""[ -/;-@]*"

Or you could list individual delimiting characters between the square
brackets [].
 

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

Top