Link to home
Start Free TrialLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

Assigning a keyboard shortcut to a macro in MS Access

I have a macro named GetData1 in an Access database. I would like to assign a keyborad shortcut to it. How do I do that?

Thanks,

John
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
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
Avatar of John Carney

ASKER

Thanks for the tip on dragging the macro to the desktop, that could be really useful.

I'm trying to create an AutoKeys macro, but it won't allow me to assign a key combination. I tried inputting "control-m" but it wouldn't take it. So I tried "Shift-M" which it took, but I couldn't save it because the synatx was not allowed.

So how do I get my key combination set and saved?

Thanks,

John


From Office Help:
 
Add the action or set of actions you want the key or key combination to carry out. For example, you could add a RunMacro action that runs the Print Current Record macro when CTRL+P is pressed. 
 
Acceptable key combinations according to Office Help: (???)
^A or ^4 CTRL+A or CTRL+4 
{F1} F1 
^{F1} CTRL+F1 
+{F1} SHIFT+F1 
{INSERT} INS 
^{INSERT} CTRL+INS 
+{INSERT} SHIFT+INS 
{DELETE} or {DEL} DEL 
^{DELETE} or ^{DEL} CTRL+DEL 
+{DELETE} or +{DEL} SHIFT+DEL 

Open in new window

Instead of control-m

Use

^M

that's the carot

OR

+M

the plus sign and M

+ = shift
^ = Control

Note ... you cannot use ALT.

mx
I tried these options and I still get the same error message.  What am I doing wrong?

Thanks,

John
Here's the message I keep getting.

AutoKeysError.jpg
Sorry ...

You cannot use + except with the non-printable keys like INSERT, F1, etc.  But you can use ^M, for example - I just tested that.

mx
It still doesn't work for me. I find that I can in fact save the AutoKeys with ^M or ^Y (which I like better because the two keys are adjacent), but they don't work. Is there some kind of bug in my copy of Access 2003?
Can you:

1) Compact & Repair (to shrink the size),
2) Zzip up the MDB (to further shrink the size)
3) Attach the file for upload here (using the 'Attach File function below) ... removing any sensitive data of course?
4** And please give a clear explanation of exactly how to reproduce the problem.

mx
Here's the mdb. Let me know if you can save it with a functioning shortcut key.

Thanks,

John

AutoKeysShortcut.mdb