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
Microsoft Access

Avatar of undefined
Last Comment
John Carney

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
John Carney

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

DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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
ASKER
John Carney

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

Thanks,

John
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
John Carney

Here's the message I keep getting.

AutoKeysError.jpg
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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
ASKER
John Carney

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?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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
ASKER
John Carney

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

Thanks,

John

AutoKeysShortcut.mdb