Why does this not work?
--------------------------------------------
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Command1.SetFocus
End Sub
Private Sub Text1_Validate(Cancel As Boolean)
MsgBox "Validate"
End Sub
---------------------------------------------
-it works if I use the mouse to give focus to command1
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
--------------------------------------------
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Command1.SetFocus
End Sub
Private Sub Text1_Validate(Cancel As Boolean)
MsgBox "Validate"
End Sub
---------------------------------------------
-it works if I use the mouse to give focus to command1
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'