Search for a record in Access

R

Ricky

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
 
A

Allen Browne

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.
 
A

Albert D. Kallal

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....
 
Top