-
Enter Key
I have a simple program. I have one text box and one label control, if I type in some number in the text box then click OK button it will give me some character. I want the user to be able to press ENTER key after type in the number in the text box. then it will trigger OK button. How am I gonna do that????
-
Re: Enter Key
In the KeyPress event for the text box write the following:
If KeyAscii = 13 Then
Call cmdCommand1_Click()
End If
Call the name of your Ok buttons Click event...
KeyAscii 13 is the Enter key...
-
Re: Enter Key
You can also set the default property of the command button to true, that way you don't have to do anything to let the command button catch the enter
Crazy D @ Work :-)