Paul McCabe
asked on
MS Access Hotkeys: Calling a function from a macro
Hello Experts,
I am using Access 2013 / Windows 7 64-bit.
I have a function in a standard module that closes all open forms except for the main navigation form. It works perfectly when placed behind a command button, so the code is fine. It is pretty useful, but would be even more so if I could run it by pressing a function key on the keyboard (F1, F2 etc).
To this end, I have created a macro called "Autokeys"; this contains a submacro called {F3}, and I am trying to call the form closing function from this but it is not working for me.
The name of the standard module is S_CloseAllForms, and the name of the function within this is Public Function CloseAllForms(). I have tried to call the function from the AutoKeys macro using "execute procedure", "execute macro", "execute application" and "execute data macro" options, naming the function "S_CloseAllForms.CloseAllF orms" and various variations thereof. Depending on the combination I get either no response or error messages mostly saying that the function cannot be found. I would be most grateful if anyone could point me in the right direction.
I am using Access 2013 / Windows 7 64-bit.
I have a function in a standard module that closes all open forms except for the main navigation form. It works perfectly when placed behind a command button, so the code is fine. It is pretty useful, but would be even more so if I could run it by pressing a function key on the keyboard (F1, F2 etc).
To this end, I have created a macro called "Autokeys"; this contains a submacro called {F3}, and I am trying to call the form closing function from this but it is not working for me.
The name of the standard module is S_CloseAllForms, and the name of the function within this is Public Function CloseAllForms(). I have tried to call the function from the AutoKeys macro using "execute procedure", "execute macro", "execute application" and "execute data macro" options, naming the function "S_CloseAllForms.CloseAllF
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER