View Full Version : Creating Autokey
znet2705zc
Mar 19, 2009, 01:16 PM
How can we create Autokey?
For example , " F1 " open an special form or "F2" run a query
StaticFX
Mar 19, 2009, 01:27 PM
DO you mean a HotKey?
I'm NOT sure you can do it... at least not with VBA
Here is a list of all the HotKeys set for Access
All hotkeys - Microsoft Access Hotkeys - Keyboard Shortcuts (http://allhotkeys.com/microsoft_access_hotkeys.html)
You best bet would be to create a form with buttons, and set the hotkeys for the buttons
Example
Create a button with the Text R&un Query
(yes the & was on purpose)
Now to trigger the Button you would hit ALT U
Hope this helps.
ScottGem
Mar 19, 2009, 04:13 PM
You can do this by assigning a macro to a function key. You can also assign macros to special key combinations.
And yes this is called hotkeys. Read up on macros in Access help for details on how to do this.
StaticFX
Mar 20, 2009, 01:06 PM
Macros! <Shudder>
I blocked those out of my head.. lol.. I hate them
But, good thinking. That will work
ScottGem
Mar 20, 2009, 02:27 PM
My sentiments exactly, but this is one place where macros have a place. If you want to use keyboard shortcuts to trigger code execution.