Tips Index
Microsoft Access Tips and Tricks
List "Hot Keys" on Forms
When working on an Access application, it may sometimes be useful to know all the "hot keys" that are defined on a form. These are the keystrokes that are associated with the activation of a particular control, so that pressing a particular key -- or Alt+the key -- triggers a command button or sets the focus to a text box, for example. In Access, hot keys are specified at design time by putting an ampersand (&) before the desired character in a control's caption (if it has a Caption property), or the caption of a label attached to the control.
When you're working on a complex form and want to assign a new hot key, or you're writing documenation for a form, you may need a list of all the existing hot keys. Here's a function that you can call from the Immediate window or from some other procedure, to list all the hot keys on a form. The output is written to the Immediate window, but you can change that, of course.
code: click in the frame, Select All, then Paste into your code editor
Versions: Access 95 to 2007
Categories: VBA, How To, Utility Functions
Date: 13 May 2009