-
Hi all
I meet a problem when I am writing a vb program which is about creating database. The input interface of this problem which include many textboxs. I want to know the way that how can i move the focus from textbox to textbox using the "up" and "down" key. Thank you!!
-
Add 2 textboxes to your form and copy the following code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDown Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then
Text1.SetFocus
End If
End Sub
Hope this helps
TheBao