ACC: SendKeys Macro Does Not Run

Last reviewed: May 28, 1997
Article ID: Q96579
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

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

A macro including a SendKeys macro action does not run the SendKeys action.

CAUSE

If the Wait argument for the SendKeys action is not set to Yes, the macro action is run after some delay. Depending upon the following macro action, the keystrokes that are sent may not be valid. If the keystrokes are not valid, the SendKeys action appears not to have run.

RESOLUTION

Set the Wait argument for the SendKeys action to Yes.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a macro named TestMacro.

          Macro: TestMacro
          --------------------------
          Action: SendKeys
    
             Keystrokes: %FX
             Wait: No
          Action: MsgBox
             Message:  "HELLO WORLD"
    
    

  2. Save the macro.

  3. Run TestMacro.

    The first macro action should quit Microsoft Access. However, the Wait argument is set to No and the message box is activated before the SendKeys action is run. When the keystrokes are processed, they are not valid, and you hear beeping instead. If the Wait argument were set to Yes, the SendKeys action would have completed before moving to the next action, thus quitting Microsoft Access.


Additional query words: key strokes
Keywords : kbusage McrActn
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.