Find Command

P

PowellGirlTN

I have a form where I'm filtering to find records by last name. To avoid
having to click on the command button, I tried to put this code in the On
Focus hoping that when the user tabs to the command button the records would
be found. It does bring in the records,however now the navigation button
doesn't work to view additional records with the same last name. How can I
get the tab to work, then allow the use of navigation buttons to view the
additonal records found. Thank you

DoCmd.ApplyFilter , "[LastName]= '" & txtLastName & "'"
 
A

Allen Browne

Try the AfterUpdate event procedure of txtLastName.
(Presumably this is an *unbound* text box.)

If you want to search after each keystroke, you could use this one:
Find as you type
at:
http://allenbrowne.com/AppFindAsUType.html

That consists of 2 controls and some code you copy into your database. You
set one property, and that's it. In the first control (combo) you choose the
field you want to search on (e.g. Lastname.) In the 2nd control (text box),
you type the name you want to find.
 

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

Top