RunCommand


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.




Access VBA Programming
Microsoft Access VBA Programming for the Absolute Beginner
ISBN: 1598633937
EAN: 2147483647
Year: 2006
Pages: 214
Authors: Michael Vine

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net