Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign keyboard shortcut to open form? 1

Status
Not open for further replies.

ThinWhiteDude

Technical User
Sep 21, 2004
97
US
I have an Access 2002 database with a main switchboard and several other switchboards. My customer would like to go directly to his switchboard without going through all the others, but doesn't want his access button on the main switchboard. These are all customized forms, by the way, not actually setup throught the Switchboard Manager.

With this in mind: Is it possible to assign a keyboard shortcut to open a form?

Thanks much for any help,
TWD
 
I found the following in access HELP searching for autokeys...

Assign an action or set of actions to a key

You can assign an action (action: The basic building block of a macro; a self-contained instruction that can be combined with other actions to automate tasks. This is sometimes called a command in other macro languages.) or set of actions to a specific key or key combination by creating an AutoKeys macro group (macro group: A collection of related macros that are stored together under a single macro name. The collection is often referred to simply as a macro.). When you press the key or key combination, Microsoft Access carries out the action. If you assign an action to a key combination that is already being used by Access (for example, CTRL+C is the key combination for Copy), the action you assign this key combination replaces the Access key assignment.

In the Database window (Database window: The window that appears when you open an Access database or an Access project. It displays shortcuts for creating new database objects and opening existing objects.), click Macros under Objects.
Click New.
Click Macro Names on the toolbar.
In the Macro Name column, type the key or key combination to which you want to assign the action or set of actions
Syntax for AutoKeys key combinations

The following table shows the key combinations you can use to make key assignments in an AutoKeys macro group (macro group: A collection of related macros that are stored together under a single macro name. The collection is often referred to simply as a macro.). These key combinations are a subset of the syntax used in the SendKeys statement in Microsoft Visual Basic (Microsoft Visual Basic: A high-level, visual-programming version of Basic. Visual Basic was developed by Microsoft for building Windows-based applications.).

SendKeys syntax Key combination
^A or ^4 CTRL+A or CTRL+4
{F1} F1
^{F1} CTRL+F1
+{F1} SHIFT+F1
{INSERT} INS
^{INSERT} CTRL+INS
+{INSERT} SHIFT+INS
{DELETE} or {DEL} DEL
^{DELETE} or ^{DEL} CTRL+DEL
+{DELETE} or +{DEL} SHIFT+DEL


Add the action or set of actions you want the key or key combination to carry out. For example, you could add a RunMacro action that runs the Print Current Record macro when CTRL+P is pressed.


Repeat steps 4 and 5 for any other key assignments you want to make.
Save the macro group with the name AutoKeys.
The new key assignments are in effect as soon as you save the macro group and each time you open the database.




--Todd


TechnicalUser pretending to be a programmer(shhh… the boss doesn’t know yet)
 
Todd,

Thank you so much for your quick and pertinent answer.

I had looked up "shortcut keys," "keyboard shortcuts," and things like that in Access Help, with no luck, hadn't thought of the Autokeys thing.

This worked beautifully, thank you again for helping me, here's a star,

TWD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top