Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

You can use the RunMenuCommand macro action in Access desktop databases to run a built-in Access command.

Note: Beginning in Access 2010, the RunCommand macro action was renamed to RunMenuCommand. The argument for this macro action remains unchanged.

Setting

The RunMenuCommand action has the following action argument.

Action argument

Description

Command

The name of the command you want to run. The Command box shows the available built-in commands in Access, in alphabetical order. This is a required argument.

Remarks

You can use the RunMenuCommand action to run an Access command from a custom menu bar, global menu bar, custom shortcut menu, or global shortcut menu.

You can use the RunMenuCommand action in a macro with conditional expressions to run a command depending on certain conditions.

When you convert an Access database from a previous version of Access, some commands may no longer be available. A command may have been renamed, moved to a different menu, or may no longer be available in Access. The DoMenuItem actions for such commands can't be converted to RunMenuCommand actions. When you open the macro, Access will display a RunMenuCommand action with a blank Command argument for such commands. You must edit the macro and enter a valid command argument, or delete the RunMenuCommand action.

To run the RunMenuCommand action in a Visual Basic for Applications (VBA) module, use the RunCommand method of the Application object. (This is equivalent to the RunCommand method of the DoCmd object.)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×