Assign a keyboard shortcut to a macro.

jplank

New member
Local time
Today, 04:10
Joined
Mar 27, 2013
Messages
4
Is there a simple way to assign a keyboard shortcut to a macro in Access 2007? I understand that macros behave differently in Access than they do in Excel (which I'm more familiar with). I have written a sub called "ImportAll" in Module1. I'd like it to run when I push Ctrl+I. How would I go about achieving this?

I tried following the steps outlined in microsoft documentation (can't post a link due to only having 2 posts), but I was given an error "Microsoft Office Access can't find the object 'ImportAll.'"
 
Create a macro called AutoKeys and then in the Macro Name you would use ^+I as its value and under Action use RUN CODE and put in the procedure name with the parens in its FUNCTION NAME argument near the bottom of the screen. In 2007 I've noticed that Sub doesn't always work but Function usually does. So make sure that your Function procedure is in a STANDARD MODULE and the module name is not named the same as the procedure.
 

Users who are viewing this thread

Back
Top Bottom