Parameters in queries

S

Sarah at DaVita

I have a query where I set the criteria as like [enter name]. So when I
anwser the prompt I can enter As* to get the data I want to see which in the
case is Astro, Hobby, West. How can I do this so the user can just enter
what they want and the wildcard would be automatically apended to the end of
the entry? So.. if they enter as it would return all that start with as or it
they enter *hobby it would return all with hobby in the name? Clear as mud?
 
J

Jeff Boyce

Sarah

In the selection criterion "cell":

Like * & [enter search term] & *

will find any record containing the search term in any location within the
field.

Another approach, perhaps more user-friendly, is to provide a form and a
combo box, and let the user use the combo box to search, then run the query
using the contents of the form's combo box as the criterion.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Sarah at DaVita

THANKS!!!

Jeff Boyce said:
Sarah

In the selection criterion "cell":

Like * & [enter search term] & *

will find any record containing the search term in any location within the
field.

Another approach, perhaps more user-friendly, is to provide a form and a
combo box, and let the user use the combo box to search, then run the query
using the contents of the form's combo box as the criterion.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sarah at DaVita said:
I have a query where I set the criteria as like [enter name]. So when I
anwser the prompt I can enter As* to get the data I want to see which in
the
case is Astro, Hobby, West. How can I do this so the user can just enter
what they want and the wildcard would be automatically apended to the end
of
the entry? So.. if they enter as it would return all that start with as or
it
they enter *hobby it would return all with hobby in the name? Clear as
mud?
 
Top