Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set action of enter key

Status
Not open for further replies.

herrld

Technical User
May 10, 2001
69
US
I have a form with 2 text boxes for users to enter search criteria. There is a search button which works great. I got the code for it from this forum.
What I need to do now is this,
When a user enters the search criteria in textbox1, and hits the enter (or tab) key, I want the textbox2 to receive the focus.
When a user enters the search criteria in textbox2, and hits enter (or tab) I want the focus to go to the Search button. Linda
 
Her: In the "Afterupdate" event of the textbox just send the focus:

Me![txtBox2].SetFocus

..same with button

Me![cmdMyButton].SetFocus

...you can also use the "OnExit" event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top