ACC: "SendKeys Requires Microsoft Access Utility Add-in" Error
ID: Q145773
|
The information in this article applies to:
-
Microsoft Access versions 7.0, 97
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:
- If you want to set a field to a specific value, try using a SetValue
action in a macro or set it directly in Visual Basic. For more
information about the SetValue macro action, search the Help Index for
"SetValue action," or ask the Microsoft Access 97 Office Assistant.
- If you want to carry out a menu command, try using a RunCommand action
or a RunCommand method (or a DoMenuItem action or a DoMenuItem method in
Microsoft Access 7.0), in Visual Basic for Applications. For more
information about the RunCommand macro action, search the Help Index for
"RunCommand Action." For more information about the DoMenuItem macro
action, search the Help Index for "DoMenuItem action."
NOTE: In Microsoft Access 97, the DoMenuItem method and the DoMenuItem
action have been replaced by the RunCommand method and the RunCommand
action. They are included in Microsoft Access 97 for compatibility with
earlier versions.
- If you want to fill in dialog boxes, try running the equivalent method
in Visual Basic (if one exists) and setting any arguments that
correspond to the dialog box options.
- If you want to activate another application from Microsoft Access, try
using Automation or dynamic data exchange (DDE) (if supported by the
other program). For more information about Automation (or DDE),
search the Help Index for "OLE" or "DDE," and then view the available
topics.
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.
- Open the sample database Northwind.mdb.
- 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
- Close the macro and save it as FillField.
- Create a form not based on any table or query in Design view.
- Add the following two controls to the form:
Form: Form1
-----------------------
Text box:
Name: Text0
Width: 3 in.
Command button:
Name: Button0
Caption: Fill Field
- Set the command button's OnClick property to the FillField macro.
- View the form in Form view.
- 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