How do I setup a search in a Microsoft Access Form

  • Thread starter Thread starter Rookie
  • Start date Start date
R

Rookie

Is there aome way to setup a search for different things in a
Microsoft Access form? Currently I have a form setup, but I am
required to go to the table and using the Edit-Find_First command to
type in what I am looking for. This command highlights the text, we
then close the pop-up menu and scroll over to see which record it
corresponds to. Next we have to re-open the pop-up menu and repeat
the process using the find_next command again till we've written down
all the info. we need. Finally, I close the table, open the form, and
proceed to the individual records. I am looking for a way to decrease
the time it takes to do this. Any help would be appreciated.

Thanks
 
uh...searching, finding and returning what was found is
what queries are for. duh.
write a select query. in the criteria pane of the search
field enter [enter something]. attatch it to a button.
 
This is what I did:

Create a Macro
Macro Name Condition Action
Open Open Form set to the form name Not IsLoaded("Form
Name") can get IsLoaded from Northwind
Close Close set to form name
OK Set Value
Cancel Close set to form name

Create a Form with unbound fields that represent the fields in the table
Name these fields logically
Add a control button for OK and Cancel
Set the On Click to the appropriate part of the Macro

Create a Query for the table
You can include everything in the table or just the fields
you want to see
and search by
In the criteria for the search field(s) add [Forms]![form
name]![field name]

Create a report for the results
Based on your Query create a report showing your results
For On Open use the open macro
For On Close use the close macro

When you click to open the results report it will open the form for you to
put in the criteria and produce a report for the results. Just be wary of the
“and†and “or†in the query if using more than one set of criteria.
 
Solution without adding any macros, queries or other "codes":
With the form open; click on the field for the thing you want to search
(whatever it is). Then click on the binoculars in the toolbar at the top (or
use the pull-downs and go to Edit-> Find or click CTRL + F), type in all, or
part, of what you want to find and click "Find Next". It will go to the first
record with this information in that field that you're searching on. Then you
can edit, look at, or print the record that's active. If it's not the record
you want, just click "Find Next" again and it'll go through every item in
your database that matches until it runs out of things that match.
We do TONS of this with our database, and it's WAY easier than setting up
queries or using Macros. You can, if you want a printed version (on screen or
on paper) set up a query with a report, but if you don't want to print
anything, this is easier.

If you need anything else, feel free to ask.

Melissa
 
Back
Top