search command on form

  • Thread starter Thread starter KR
  • Start date Start date
K

KR

I want to create a command button on my form so that I can search any field
on the form and the records that match it will pull.

So basically I want to be able to type the info. I am looking for in a box,
click on the search button and have it pull up the info. that matches the
info.
 
Put a combo box on your form. Allow the wizard to do that for you and set up
whatever you want to search for, like an ID, a person name, whatever. Then
right click on the combo and go to properties. Go to events. Go the after
update event. click the little button out to the right and start the code
builder. Type:
Me.Filter = "[ID or whatever] = """ & Me.Combo# & """"
Me.filteron = True
The combo # will be listed, like combo10 or combo23.
 
Back
Top