Search Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form based on a parameter query for last name. Enter form from
switchboard and last name parameter pops up - end user will fill in last name
and then it will populate the main form and two subforms with details of
person requested. This works fine. What I would like to do is add the
ability to search for another record without exiting the main form to get the
parameter entry box to pop up again. Any suggestions.... I have been playing
with command button to no avail - I am open to any suggestions, I just want
to use the easiest method for the end user to search

Thanks!
 
Why not have the forms recordsource be filtered rather than use a parameter
query?
Just have a combo box on the form which lists each user. When you click on a
name, just apply the filter to the recordsource to read the record.
Look up DOCMD.APPLYFILTER in Access Help.

Dorian
 
Thanks for the quick answer Dorian,

I had thought of that, but my concern is this table will eventually have
thousands (and thousands) of records in it. I was afraid the combo box would
be too long. If that is the only way to do it, I will do it - but I was
looking for a "search button" type solution
 
You don't have to use a comboBox as initally suggested. A text box will
work. I would however recommend using Continuous Form to display the
results as you might end up with multiple results. Plus doing so will
allow you to use wildcards in the search so that a person could enter

Last Name First Name
Wi John

And get the following records

Wilson John
Williamson John

To display the detail you would add a button that displays the specific
record from the search results. Additionally, you can test to see if
only 1 record was return and if so, automatically dispaly the detail
record bypassing the need for the user to click the button.
 
Thanks David, If I am understanding correctly - use a filter by last name,
first name and add a command button to refilter. After I tried that I found
Access will say filtered at the bottom by the record indicators, but it is
not filtered it is showing all records. I can't change the property to
continuous form because I have 2 subforms in the main form I am trying to
filter
 
Back
Top