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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hot keys

Status
Not open for further replies.

sdimaggio

Technical User
Jan 23, 2002
138
0
0
US
I am having trouble with adding hot keys.

I put an "&" infront of the text i.e. "&Customers" and then hit Alt+C or Ctr +C and nothing happens.

How do I create a global hot key to open forms when I am anywhere in the program?

thanks.

Steve
 
Most windows applications, including Microsoft Access only respond to Alt+ combinations that are on the form that is currently active. So, the method that you are attempting to use would only work if you define Alt+C on all of your forms to do the same thing. This would be a mistake and quite tedious to implement and maintain.

This is one of the VERY rare instances in which I recommend using a Macro in Microsoft Access. Macros are typically bad because they have no error handling. However, in this situation, an exception can be made.

You create a macro with the special name: Autokeys

You then define key combinations in this macro, and the function that you want them to execute when pressed. This can be handy for defining keys as well as disabling keys. For the keys that you want defined, you create a Public Function in a module that does the work.

Search on "Autokeys" in the Microsoft Access help for the exact syntax of specifying key combinations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top