Hi All,
I have a form that has a "search" button with serveral text boxes. After the user enter data in the text box(es), the user would hit the "search" button to get the data. I am wondering if I can connected the "search" button to the "ENTER" key (i.e. when "ENTER" key is hit, it automatically run the same code as the "search" button being pressed/hit).
Any advices?
Thanks.
Hi tnguyen,
Use the text box properties to add code to each text box "On Key Press" event.
Cheers,Code:If KeyCode = vbKeyReturn Then ' Put your search button code here End If
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
I tried the above code, but still not getting it to work. Whenever i click the "Enter" key on my keyboard, it still acts like a "Tab" key.
Any other sugguestions?
Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks