ACC: "SendKeys Requires Microsoft Access Utility Add-in" Error

ID: Q145773


The information in this article applies to:


SYMPTOMS

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

When you carry out a SendKeys macro action, you may receive the following error message:

The SendKeys action requires the Microsoft Access Utility Add-in to be loaded.


   Solution
   Run Setup to reinstall Microsoft Access and the Microsoft Access
   Utility Add-in. 


CAUSE

The Keystrokes argument of the SendKeys action has incorrect syntax. For example, you may have enclosed the Keystrokes argument in quotation marks ("), entered incorrect syntax, or misspelled some text.

If you receive the error message after converting a database created in an earlier version of Microsoft Access, the specified keystrokes may not work in Microsoft Access 7.0. or 97. Or, the Keystrokes argument may have been enclosed in quotation marks which was not required in earlier versions but was permitted. In Microsoft Access 7.0 and 97, however, you cannot enclose the Keystrokes argument of a SendKeys macro action in quotation marks.


RESOLUTION

Open the macro in Design view and fix the Keystrokes argument as necessary. For example, remove any quotation marks, correct a misspelling, or fix any syntax errors.

NOTE: If you want to include a quotation mark as one of the keystrokes used by the SendKeys macro action, you need to enter two sets of quotation marks in the Keystrokes argument, as follows:


   Macro1
   --------------------------------------------------------------
   SendKeys
      Keystrokes: ""Building Applications with Microsoft Access""
      Wait: No

   -or-

   Macro2
   --------------------------------------
   SendKeys
      Keystrokes: Michael ""Mick"" Suyama
      Wait: No 


MORE INFORMATION

NOTE: If you use a SendKeys action to carry out menu commands or fill-in dialog boxes, you may want to find an alternative method for the action. The SendKeys' keystrokes may not work in future versions of Microsoft Access because the user interface may change. Depending on your purpose for using SendKeys, you may want to try one of the following methods:

Steps to Reproduce Behavior

CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file or perform these steps on a copy of the Northwind database.
  1. Open the sample database Northwind.mdb.


  2. Create a new macro as follows:
    
          Macro Name   Macro Action
          -------------------------
          FillField    GotoControl
                       SendKeys
    
          FillField Actions
          -------------------------------
          GotoControl
             ControlName: Text0
          SendKeys
             Keystrokes: "Sample text for SendKeys."
             Wait: No 


  3. Close the macro and save it as FillField.


  4. Create a form not based on any table or query in Design view.


  5. Add the following two controls to the form:
    
          Form: Form1
          -----------------------
          Text box:
             Name: Text0
             Width: 3 in.
          Command button:
             Name: Button0
             Caption: Fill Field 


  6. Set the command button's OnClick property to the FillField macro.


  7. View the form in Form view.


  8. Click the Fill Field button. Note that you receive the error message mentioned in the "Symptoms" section.



REFERENCES

For more information about the SendKeys macro action, search the Help Index for "SendKeys action," or ask the Microsoft Access 97 Office Assistant.


Keywords          : kberrmsg kbusage McrArg 
Version           : 7.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 23, 1999