|
-
Jan 9th, 2001, 09:46 PM
#1
Thread Starter
New Member
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!!
-
Jan 9th, 2001, 09:57 PM
#2
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|