search several fields

G

Guest

I have a database with client’s details.
Clients table has several fields; name, address, code, etc.
Sometimes users may need to search for one or several fields.

I was thinking of starting with an unbound form with all clients table fields.
The user fill all fields he may want to search for … hit the search button
and another form show the results.

I have not done something like this. I have done it with only one field
searchable.
So, any suggestions are most welcome.
 
A

Al Campagna

Raul,
Have you tried using the built in Filter By Form? That would be the easiest... if it
suits your needs. With a bit of practice, it's very useful.

Otherwise, an unbound Search Dialog form where the user enters various field values to
search for would be a good way to go.

Let's say you wanted to search for a LastName in a State.
Use criteria like these against those fields in your query...
Like Forms!frmSearchDialog!LastName & "*"
Like Forms!frmSearchDialog!State & "*"

ex. "Jones"
Is State was left null, the query would still find all Jones records regardless of
State.
ex. "Jones" "NY"
If State was indicated, the query would deliver all Jones and NY records.
ex. "J" "NY"
Would return all LastNames beginning with "J" in "NY"
 

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