Search for a record in Access

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

Guest

Hi everyone, I was wandering if anyone can help me with a little problem. I
have a table of 500 records. Now I want to put a "Search" button on a form so
that, once the user types in the customerID and clicks Search, it would
display the corresponding record in all the textfields on the form. Is it
possible?

Thanks
 
You can place an unbound control on the form (usually in the Form Header
section), and use its AfterUpdate event procedure to move to that record.

For an example of the code, see:
Using a Combo Box to Find Records
at:
http://www.allenbrowne.com/ser-03.html
Although the article uses a combo, you can use the same code with a text
box.
 
You don't mention what version of ms-access, but if you bring up the form in
design mode, and use the wizard to place a combo box on the form, then you
can build a combo box that "searches" for a particular customerID, and the
record will appear.

Give the wizard a try..as it will make this for you....
 

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

Similar Threads


Back
Top