Table of contents
TOC
折叠目录
展开目录

Application.RunCommand 方法 (访问)Application.RunCommand Method (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

RunCommand方法运行内置命令。The RunCommand method runs a built-in command.

语法Syntax

表达式RunCommand(* 命令)expression. **RunCommand( ** Command* )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
命令Command必需RequiredAcCommandAcCommand指定要运行 commend AcCommand常量。An AcCommand constant that specifies the commend to run.

注解Remarks

在 Microsoft Access 的每个菜单和工具栏命令都有一个相关联的常量,可以使用RunCommand方法来从 Visual Basic 中运行该命令。Each menu and toolbar command in Microsoft Access has an associated constant that you can use with the RunCommand method to run that command from Visual Basic.

不能使用RunCommand方法来运行自定义菜单或工具栏上的命令。仅可以使用内置菜单和工具栏来使用它。You can't use the RunCommand method to run a command on a custom menu or toolbar. You can only use it with built-in menus and toolbars.

RunCommand方法替换DoCmd对象的DoMenuItem方法。The RunCommand method replaces the DoMenuItem method of the DoCmd object.

另请参阅See also

概念Concepts

Application 对象Application Object

© 2018 Microsoft