i have 3 text box TxtFirstName,TxtMiddleName,t3 and 1 ComboBox cmbStatus
i have written code in TxtFirstName keypress event,key down event for get
the focus in TxtMiddleName by pressing Enter.
But when i press enter in TxtFirstName ,cursor will goto comboBox cmbStatus
not TxtMiddleName.
please help me i want to set focus in TxtMiddleName when i press enter in
TxtFirstName .
eg.
Private Sub TxtFirstName_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TxtFirstName.KeyDown
If e.KeyCode = 13 Then
TxtMiddleName.Focus()
End If
End Sub
Private Sub TxtFirstName_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TxtFirstName.KeyPress
If Asc(e.KeyChar) = 13 Then
TxtMiddleName.Focus()
End If
End Sub