Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox uses Enter key not work

Status
Not open for further replies.

oke

Programmer
Dec 15, 2000
5
0
0
ID
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.

Please Help.....

Thanks


Rubi Andrianto
Programmer
Indonesia

 
It's the tab key that let's you move between text boxes.
 
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

Hope this will help you.
Fleer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top