Parameters in queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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?
 

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