How do you use the enter button instead of the tab button to move from text box to text box when my application is running?
Reston
Printable View
How do you use the enter button instead of the tab button to move from text box to text box when my application is running?
Reston
Put this in the KeyPress event of each textbox...
VB Code:
If KeyAscii = vbKeyReturn Then SendKeys "{TAB}" KeyAscii = 0 End If
:)
Here is the 15th time i have typed this little ditty... I am nominating myself for a noball piece prize :rolleyes:
Disclaimer: This is only useful if u dont use a Default command button on a form
Put a small command button on ur form. Set Default property to true, Tabstop to false and then hide it behind a textbox, picture box or whatever.
In the click event of the button just add this
SendKeys "{TAB}"
and that's it. U no longer have to put code into each textbox.
I second the nominiation! :)Quote:
Originally posted by beachbum
I am nominating myself for a noball piece prize