Hi,
I have this logon form where a user has to give in his name and password. There are also 2 buttons on the form: Submit and Cancel. Now, I want to make sure that pressing the return button does the same as when pressing the button Submit.
So it should do this:
Private Sub Form_KeyPress(KeyAscii As Integer)
If (KeyAscii = vbKeyReturn) Then
Submit_Click
End If
End Sub
My problem is that within the company where I work, the return button functions as a tab button in access. Because of this, the code above does not satisfy.
Is there anyone who can tell me how I can take care of this using vba code? (so without changing anything in the access menu, as there are way too many pc's involved)
Thanks a lot in advance,
dj.
I have this logon form where a user has to give in his name and password. There are also 2 buttons on the form: Submit and Cancel. Now, I want to make sure that pressing the return button does the same as when pressing the button Submit.
So it should do this:
Private Sub Form_KeyPress(KeyAscii As Integer)
If (KeyAscii = vbKeyReturn) Then
Submit_Click
End If
End Sub
My problem is that within the company where I work, the return button functions as a tab button in access. Because of this, the code above does not satisfy.
Is there anyone who can tell me how I can take care of this using vba code? (so without changing anything in the access menu, as there are way too many pc's involved)
Thanks a lot in advance,
dj.