David Anderson
Registered User.
- Local time
- Today, 17:31
- Joined
- Nov 18, 2007
- Messages
- 84
I have a form with a small navigation subform that provides Previous and Next arrow buttons for stepping through a recordset. I would like to program a KeyDown event for my main form that will trap presses of both the Z and C keys, using Z to trigger a simulated click of the Previous arrow button and using C to trigger a simulated click of the Next arrow button.
I tried the following code but it fails with an "Object doesn't support this property or method" error.
If KeyCode = vbKeyZ Then
Me![SFNavButtons].cmdPrevious_Click
End If
Is it possible to simulate key clicks in code and if so how can it be done?
David
I tried the following code but it fails with an "Object doesn't support this property or method" error.
If KeyCode = vbKeyZ Then
Me![SFNavButtons].cmdPrevious_Click
End If
Is it possible to simulate key clicks in code and if so how can it be done?
David