Find button for users to select records

W

woods1119

I am currently doing a project and once of the criteria that I must include
is a "find button for users to select the records to update based on user
entered criteria". I find the description a little vague but I'm thinking
that they want me to click on a name (in my example it is a dog's name) then
the record for that dog would open up...right? I have a switchboard, can I
place this button on here? Currently the swtichboard has two Add buttons
that opens a form for data entry. What would the general code be? Thanks
for any help, this peoject is driving me nuts!
 
A

Allen Browne

Access already provides this. You can click in any field (e.g. DogName), and
then click the Find button on the toolbar to search for a value.

If you want to code that with a button, set focus to the field you want to
search, and then activate the Find button like this:
Me.[DogName].SetFocus
RunCommand acCmdFind

For a more powerful search, you can use the Filter By Form button on the
toolbar.

If you are comfortable with VBA code, and want an example of how to offer
the user several unbound filter boxes where they can enter criteria,
download this example:
http://allenbrowne.com/unlinked/Search2000.zip
 
Top