PRB: Run Macro Command Not Available on Startup Menu (2.0)Article ID: Q127057Creation Date: 09-MAR-1995 Revision Date: 05-FEB-1996
The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
When you run a macro or an Access Basic routine that uses a DoMenuItem
action to choose the Run Macro command from the startup menu, you may
receive the error message "Command not available."
CAUSE
The Run Macro command is not available on the startup menu.
RESOLUTION
Instead of using the DoMenuItem action to run a macro, use the RunMacro
action. You can use the RunMacro action in macros and in Access Basic code.
The syntax for the RunMacro action is
DoCmd RunMacro "<macroname>"where <macroname> is the name of the macro you want to run.
STATUS This behavior is by design.
MORE INFORMATION 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 access 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.
Steps to Reproduce Behavior
REFERENCES For more information about the RunMacro action, search for "RunMacro," and then "RunMacro Action" using the Microsoft Access Help menu. For more information about the DoMenuItem action, search for "DoMenuItem," and then "DoMenuItem Action" using the Microsoft Access Help menu. |
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.