Execute code "on enter" with text box

MrAustin

Registered User.
Local time
Today, 15:03
Joined
Oct 4, 2004
Messages
32
Hi everyone! I have a very basic form question --

I have two text fields and a button, all on the same "line" horizontally, and the two text fields are search fields. The button is a submit button. My question is, how to program the two text boxes so that when the return or enter button is pressed, it executes the code contained in the button (instead of moving to the next field)?

Thanks! You guys are awesome!
 
Search for the KeyDown or KeyPress event and you will find examples on how to test if the Enter key was pressed.
 

Users who are viewing this thread

Back
Top Bottom