like function

  • Thread starter Thread starter brino
  • Start date Start date
B

brino

hi all !

i want to use the "like" function in a query but i want the user to
enter the search variable.
i have tried "like[enter name to search]" but this doesnt return any
results for some reason.
any ideas ???

thanks
brino
 
Like "*" & [Enter name] & "*"

will return American Gear Company and North American Telecom if "Am" is
entered in the box. If the criteria expression is:

Like [Enter name] & "*"

it will return only American Gear Company, since that is the only one that
starts with the specified letters.
 
Where are you entering this? And do you want the search to find what the
user typed anywhere in the text, or only at the beginning of the text?

If you're typing it in the Criteria cell in the graphic query designer, try

LIKE [Enter Name To Search] & "*"

to find what they typed at the beginning of the string, or

LIKE "*" & [Enter Name To Search] & "*"

to find it anywhere in the string.
 

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

Similar Threads

report problem 4
date time 2
time field 1
date time 1
filter problem 1
report 1
drop down list 1
id number 2

Back
Top