ACC: How to Set a Keystroke+Click to Activate a Command ButtonLast reviewed: August 29, 1997Article ID: Q158931 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article describes a method for using a keystroke-plus-click combination with a command button. For example, you might want click, ALT+Click, and CTRL+Click to have different actions on the same command button. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual.
MORE INFORMATIONThe sample database Northwind.mdb (or NWIND.MDB in version 2.0) contains a Main Switchboard form with several buttons, one of which reads "Exit Microsoft Access." When you click this button, it closes Microsoft Access completely. Sometimes, you may want to just close the Main Switchboard form and keep Microsoft Access and the database open. Instead of creating one command button to close Microsoft Access and another button to close the Main Switchboard form, the following example shows you how to create one button which is capable of doing both, depending on whether you click the button or press CTRL and then click the button.
REFERENCESFor more information about mouse events, search the Help Index for "mouse events," or ask the Microsoft Access 97 Office Assistant. Keywords : kbprg FmsHowTo FmsEvnt Version : 2.0 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |