Searching

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I am not very advanced with Access, but I have created a relatively complex
form.

What is the easiest way of setting it up so that when the form opens, it
asks me to enter a name (or part of a name) and then filters the form based
on this name? And a way to cancel if I want to view all records.

Thanks
 
You can setup an unbound combo box on the form that can be
used to search for a record. If you use the wizard to add
the combo box to your form, select "I want to find a
record...." from the choices available.

You can also use the built-in "Filter by Form" function
within Access that also has a "Remove Filter" action to
display all records.
 
The following assumes a field in your underlying table
called "Name".
Base the form on a query with all the field in it your
form needs. Then, in the Criteria row for the "Name"
field in the query design grid, place the following:
Like [Name] & "*"

This will prompt you with a popup window for a Name, and
will match any text you type against the beginning of the
Names in that field. Also, if you leave the box blank, it
will return all names.

Hope this helps.
 
Back
Top