G
Gina
Hi all.
on a special textfield i would like the user to be able to just press
'return' in order to set a command button the default one.
_____________________________
Private Sub txtX_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = 13) Then
cmdX_Click
End If
End Sub
Private Sub txtX_KeyPress(KeyAscii As Integer)
If KeyAscii = Chr(13) Then
cmdX_Click
End If
End Sub
______________________________
code reacts on any key but not on the return button
any idea as to how & perhaps where . . . put some right bits ?
thanks
Gina
on a special textfield i would like the user to be able to just press
'return' in order to set a command button the default one.
_____________________________
Private Sub txtX_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = 13) Then
cmdX_Click
End If
End Sub
Private Sub txtX_KeyPress(KeyAscii As Integer)
If KeyAscii = Chr(13) Then
cmdX_Click
End If
End Sub
______________________________
code reacts on any key but not on the return button

any idea as to how & perhaps where . . . put some right bits ?
thanks
Gina