ACC95: Run Macro Command Not Available on Startup MenuID: Q138772
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you run a macro or Visual Basic for Applications routine that uses a
DoMenuItem action to choose the Macro command from the Startup menu, you
may receive the following error message:
The command or action 'Macro' isn't available now"
The Macro command is not available on the Startup menu.
Instead of using the DoMenuItem action to run a macro, use the RunMacro
action. You can use the RunMacro action in macros and in Visual Basic code.
The syntax for the RunMacro action is as follows
DoCmd.RunMacro <"macroname">
This behavior is by design.
In run-time applications developed with the Microsoft Access Developer's Toolkit, the startup menu is available only if all the open forms are hidden. As a general rule, an application's users should not be allowed to gain access to this menu manually. Also, you should try to avoid using macros in applications designed to run in the run-time environment unless they are absolutely necessary (for example, for menus, custom toolbars, AutoExec macros, and so on). A macro's lack of error handling capabilities may lead to an abrupt or awkward termination of the application.
Macro Name Action
-----------------------
^{F8} DoMenuItem
^{F8} Actions
--------------------
DoMenuItem
MenuBar: Startup
MenuName: Tools
Command: Macro
For more information about the RunMacro action, search for "RunMacro
Action," using the Microsoft Access for Windows 95 Help Index.
For more information about the DoMenuItem action, search for "DoMenuItem
Action," using the Microsoft Access for Windows 95 Help Index.
Keywords : kberrmsg kbusage McrProb
Version : 7.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 3, 1999