Microsoft Access VBA Programming for the Absolute Beginner
Runs a built-in menu or toolbar command. The result is the same as if the item was selected directly from the menu or toolbar.
Syntax
expression.RunCommand Command
where Command is one of 196 AcCommand constants in Access 2003 that represent menu and toolbar items. For details, see the Access documentation or the Object Browser.
Comments
-
There is a RunCommand method of the Application object that is identical to DoCmd.RunCommand.
-
RunCommand was introduced in Access 97 with the aim of replacing the rather esoteric syntax of the DoCmd.DoMenuItem method.
Категории