Searching for data

A

Arkie

I have a database in which users can search for data through a form. The
form is tied to a query/table/macro. For example, a common search using
querieswould be by the "Site Name". However, I do not know how to set up the
query such that the user does not have to know the complete "Site Name". The
way I have the query set up is that the user must enter the full site name.
The
Site Names are unique to the site but may contain some similar words such as
mine, site, scatter, etc. How can I set it up so that the user can search by
site name, and can enter only partial search info? I tried using a combo box
but only
works if you know the beginning of the site name, not just a random word
within the site name. Any thoughts?

Thanks for any help you can give.
 
J

John Vinson

I have a database in which users can search for data through a form. The
form is tied to a query/table/macro. For example, a common search using
querieswould be by the "Site Name". However, I do not know how to set up the
query such that the user does not have to know the complete "Site Name". The
way I have the query set up is that the user must enter the full site name.
The
Site Names are unique to the site but may contain some similar words such as
mine, site, scatter, etc. How can I set it up so that the user can search by
site name, and can enter only partial search info? I tried using a combo box
but only
works if you know the beginning of the site name, not just a random word
within the site name. Any thoughts?

Use the LIKE operator, with * as a wild card: e.g. a criterion of

LIKE "*" & [Enter part of site name:] & "*"

If the user enters Lost Dutchman in response to the prompt, Access
will find "The Lost Dutchman Mine" (and you'll be wealthy beyond your
wildest dreams <g>).


John W. Vinson[MVP]
 
Top