ShortcutText Property

ShortcutText Property

In Microsoft Access 2000, you can use the Toolbar Control Properties dialog box for command bar controls to set the shortcut text that's displayed to the right of a built-in button control on a menu, submenu, or shortcut menu. Display the Customize dialog box by pointing to Toolbars on the View menu and clicking Customize. For menu bar and toolbar controls, display the menu bar or toolbar, and then right-click the button control whose ShortcutText property you want to set. For shortcut menu controls, select the Shortcut Menus check box on the Toolbars tab of the Customize dialog box, then find the shortcut menu control you want on the menu bar that's displayed and right-click the control. Click the Properties command. Enter the shortcut text you want in the Shortcut Text box. You can set this property for any built-in button control in Microsoft Access, but not for custom button controls.

Setting this property in Microsoft Access just causes the shortcut text to be displayed next to the control. If you change or add shortcut text for a built-in control, typing this shortcut key or key combination doesn't run the command associated with this control. To run this command, you must assign the shortcut key or key combination in an AutoKeys macro. In the AutoKeys macro, assign the key or key combination to a macro that uses the RunCommand action to run the command.

For custom commands, you can't display the shortcut text next to the control, but you can use the AutoKeys macro to assign a shortcut key or key combination that will run the same set of actions as the macro or function that's the setting of the control's OnAction property. Assign the key or key combination to the desired set of macro actions, or use the RunMacro or RunCode action to run the macro or function you want this key or key combination to carry out.