View Full Version : Search for records


CGC
01-15-2002, 05:51 PM
I have been looking thru some of the items on searching (on forms) but so far have been unsuccessful with my attempts. Does anyone know of a way to turn a form (used for data entry) into a search form? Ideally (perfect world), click a button and all fields turn into search fields, enter as much criteria as you like, then click a "run" button to execute the search. I'm probably dreaming, so if anyone has a plan B idea I'll take that too! Thank you!

Rich_Lovina
01-16-2002, 03:26 AM
Have you tried using the query option? You can do simple searches from the form using the Filter option, but it has limitations. Hence use a query.

LQ
01-16-2002, 05:28 AM
If you want to be able to enter criteria into a form, you could have an unbound form (not based on a particular table or query) where you enter criteria and then have a query that pulls the input from those comboboxes to use as criteria for the query. You can reference a particular combo/text box from your form in your query by putting this on the criteria line under the appropriate field name:

Like "*" & [Forms]![yourformname]![yourtextbox] & "*"

Use the asterisks if you want users to be able to enter partial words.

CGC
01-17-2002, 08:20 AM
This has been great help and I'm starting to get somewhere. But I am having problems with one of my fields on the "Search" form. It's corresponding field in the query is actually an ID field but it displays a name instead of an ID number. On the table that my query was created from, the field is setup as a lookup to the table that contains the ID number and corresponding name. So all of my other search boxes are working fine, but I guess due to the setup of this field (the ID number to the name) it won't work. Any suggestions? Thanks again!