-
I have a program in which a lot of data will be entered and stored in a database. Is there anyway to make the "Enter" key act like the "Tab" key to move from one text box to another. It will be easier for the users to press the enter key instead of having to press the tab key.
Thanks.
-
On the keypress events for the text boxes, put in the following code. It will replace the return key with a tab key entry:
If KeyAscii = vbKeyReturn Then
KeyAscii = vbKeyTab
End If
-
This will work:
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
SendKeys "{TAB}"
End If
End Sub