Creating a "Finder"

  • Thread starter Thread starter PaulHilgeman
  • Start date Start date
P

PaulHilgeman

Any guides out there on how to create a form or query that can look in
a variety of fields and then show all of the matching records? Then
double click on one of the displayed matches to launch a form with that
record displayed?

I have a database with about 20,000 customers and it will be steadily
increasing at about 200 a day. It can be cleaned, but searching for
"Smith" in the name field and having to press enter 75 times while
looking at the form for the correct customer to appear.

This would be a great help. I can generate a query based on one field
using a parameter and some creative filtering on one field and it works
well. The problem is I would like to do one field that I can enter a
phone number, a PO Number, or a last name and have any possible matches
come up.

The other thing I am struggling with is how to launch a form by double
clicking an item in a query.

-Paul
 
Hi Paul. I've posted this code so many times that I really need to create a
web page demonstrating the basic techniques. In the mean time, here is a
small sample database (24kb) for Access 2000 and later:
http://allenbrowne.com/unlinked/Search2000.zip

The search form illustrates how to filter the search form based only from
the boxes where the user actually typed some search criteria, so the
technique is efficient for many more than 20k customers. To see how it
works, examine the code behind the filter button. It is structured so that
it is very easy to add as many more search boxes as you need.

It illustrates:
- handling delimiters (for Text, Date, and Number or Yes/No fields);
- exact and partial matches (city, and company/surname);
- handling a range of values (the dates, and not getting caught with times.)

Re the "other thing" in your post, queries do not expose events such as
DblClick. Use a form (in datasheet view if you wish) where you need to do
that. The code for the text box would be something like this, assuming a
Number field named ClientID:

If Not IsNull(Me.ClientID) Then
DoCmd.OpenForm "Form2", WhereCondition:= "ClientID = " & Me.ClientID
End If
 
THanks Alan.

It looks like I can take it from here.

You have been helpful in my learning process.

Thanks,
Paul Hilgeman in Chicago
 
Back
Top