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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hitting Return on a logon form to trigger "Login" button

Status
Not open for further replies.

chadp2002

Programmer
Feb 7, 2002
6
IE
How do trigger a "Button" by hitting return in the text field above it?
 
IN THE KEYPRESS EVENT OF THE TEXT BOX, TRAP THE CODE 13 (FOR RETURN), AND IF THE ASCII CODE IS 13, JUST CALL THE CLICK EVENT OF THE BUTTON

Command1_Click
 
The other way - and perhaps easier, is to set the command button's default value...
 
HEY I ALMOST FORGOT THAT .. JUST SKIPPED MY MIND..
CHADP.. FOLLOW MMILAN'S ADVICE THAT'S THE BEST POSSIBLE WAY AVAILABLE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top