Link to home
Start Free TrialLog in
Avatar of nmichele
nmichele

asked on

Assign macro to keyboard shortcut

I'm passing a variable from one record to the next on a form by attaching a macro to a 'Next'button.

In the same form, a user can navigate to the next record by pressing the Ctrl-Tab keyboard combination. How can I assign the macro above to this keyboard shortcut so that my variable can be passed to the next record via this keyboard shortcut?

Thanks in advance.
SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nmichele
nmichele

ASKER

Thanks Jim!
I am not sure of the "timing" you need,. ...
But you could also try something like this on the current event of the form:

If Me.NewRecord Then
    DoCmd.RunMacro "YourMacro"
End If

Open in new window