Yes, you can use VBA to create autokeys. You must trap the keystrokes. First, set the Key Preview property of your form to "Yes". Then create an event procedure for the Key Down event of your form. It should end up looking something like this:
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyN And (Shift And acCtrlMask) Then
DoCmd.GoToRecord , , acNewRec
End If
End Sub
This bit of code traps the <Ctrl><n> keystroke and automatically moves the form to a new record.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.