Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 6th, 2007, 08:16 AM
Registered User
 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hotkeys in macros

Hi, all. I have another question. Can anyone tell me how I can attach a hotkey combination (e.g. CTRL+M) to a macro or a bit of VBA code in order to activate the macro or code in MS Access?

Thanks in advance.

Kind regards,


Hailey
www.msaccessrepair.com - Access Recovery
 
Old September 7th, 2007, 12:37 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You can make buttons to run your macros, and then Hot Keys for those buttons. But you would have to have a form open for this to work.

If you create a form with all the buttons to run your macros, then create Hot Keys for the buttons, then open the for acHidden when the database opens, this will give you the functionality you want. There may be a more elegant way, though, like custom menus with Hot Keys for the menu buttons.

Did any of that help?


mmcdonal
 
Old September 10th, 2007, 03:13 AM
Registered User
 
Join Date: Oct 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Hailey,
What are you tryring to achieve. Where are you using the Hot keys? - In a form, in code? You can use the sendkeys in both macros and vba by writing the combination of the keys you want pressed.





Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to have system level hotkeys in C# stygen .NET Framework 2.0 0 March 13th, 2007 07:36 AM
is it possible to have system level hotkeys in C# stygen .NET Framework 1.x 0 March 12th, 2007 11:58 PM
Excel/VBA and hotkeys Susan Chandler Excel VBA 2 September 9th, 2004 07:24 AM
Toolbar Control and HotKeys Kenny Alligood VB How-To 0 April 21st, 2004 10:20 AM
Macros vbprogwb Access VBA 21 November 12th, 2003 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.