search command on form



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


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.

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