I have design my application using VB6 but I have problem in running my aplication use Enter Key. If I want to go to the next field / text box use Enter Key is not work.
If you want to go to the next textbox using the returnkey try something like this. In this example I have 4 Textboxes, I all named them Input. Once you reached the last Textbox, he will go back to the first one.
Private Sub Input_KeyDown(Down As Integer, KeyCode As Integer, Shift As Integer)
Dim i As Integer
If KeyCode = vbKeyReturn Then
i = Down + 1
If i > 3 Then i = 0
Input(i).SetFocus
KeyCode = 0
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.