Searching and displaying a record

M

Mike

Hi,

I'm looking through my book, but am needing to add the ability for a user to
search through the records of my database on some criteria (for now, Last
name of customer) and when they find that record, be able to go to that
customer record and edit it. I assume I need some kind of query, but I'm
only able to make it show me the Last name field for all records, but I would
like to find by a specific name and click on the name and go to that record.

Thanks,

Mike
 
A

Allen Browne

A simple solution is to filter the form to the records that match. The user
can then step through those names to find the one they want, and edit it.

Take a look at this one:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
You copy the code into your database, and then combo a combo and text box
onto your form. When the form loads, it figures out what fields you have
that can be filtered, and loads their names into the combo. You choose the
field you want (e.g. Last Name), and then type the name you want into the
text box. As you type, it filters the form down to the matching records.

Here's one that is more powerful, but takes a bit more effort to implement:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
This one lets the user choose a combination of values in different fields,
and filter on that.
 
S

Stockwell43

Hi Mike,

Another way is to use the Find feature in the Edit Menu. In fact, you can
create a command button on your form through the wizard so you don't have to
keep going to the menu. Say you have the button on your form, click in the
field you want to search by, click the button and a form will pop up, enter
the Last Name, go down to Match and select Any part of Field and click Find
Next. Just another way of doing it is all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top