By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

Enter button question

P: n/a
I have a form that has three text boxes and a command button. For
textbox1, I can tab to the next field and enter into that field. If I
hit the enter button while I'm in the textbox1 field, it also tabs to
next field. However, I want the form to run the code in the Command
button instead when the enter button is pressed.

How can this be done?
TIA
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"ziggs" <zi***@hotmail.com> wrote in message
news:05********************************@4ax.com...
I have a form that has three text boxes and a command button. For
textbox1, I can tab to the next field and enter into that field. If I
hit the enter button while I'm in the textbox1 field, it also tabs to
next field. However, I want the form to run the code in the Command
button instead when the enter button is pressed.


Set the Default property of the command button to True.
Nov 12 '05 #2

P: n/a
You also set the focus to the command button, after the text box you want to
run the command code.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.