Microsoft KB Archive/106183

= ACC: Error Message Using AutoKeys Macro =

Article ID: 106183

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q106183



Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
If you use an invalid key combination in an AutoKeys macro in Microsoft Access 7.0 or 97, you may receive the following error message:

The key combination ' ' in AutoKeys has invalid syntax or is not allowed.

In Microsoft Access versions 1.x or 2.0, you may receive the following error message:

The key combination ' ' in 'AutoKeys' isn't valid and will be ignored.



MORE INFORMATION
When you open a database, Microsoft Access looks for a macro with the name AutoKeys. You receive an error if that macro contains a key combination which is not in the following list:

  SendKeys syntax example    Key combination ^A or ^4                  CTRL+any letter or number {F1}                      Any function key ^{F1}                     CTRL+any function key +{F1}                     SHIFT+any function key {INSERT}                  INS key ^{INSERT}                 CTRL+INS key +{INSERT}                 SHIFT+INS key {DELETE} or {DEL}         DEL key ^{DELETE} or ^{DEL}       CTRL+DEL key +{DELETE} or +{DEL}       SHIFT+DEL key

In Microsoft Access 1.x and 2.0, you can change the name of the key assignment macro to something other than AutoKeys as follows:


 * 1) On the View menu, click Options.
 * 2) In the Category box, select Keyboard.
 * 3) Change the Key Assignment Macro box from AutoKeys to the name you want to use.

NOTE: This feature is not available in Microsoft Access 7.0 or later.

Steps to Reproduce Behavior
 Create a new macro. Type +Z in the Macro Name column. Type Beep in the Action column. Save the macro as AutoKeys.

Note that in Microsoft Access 7.0 and 97, you receive the following error message:

The key combination '+Z' in AutoKeys has invalid syntax or is not allowed.

Note that in Microsoft Access versions 1.x or 2.0, you receive the following error message:

The key combination '+Z' in 'AutoKeys' isn't valid and will be ignored.



