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

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

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

语句用于关闭所有打开的动态数据交换 (DDE) 通道。You can use the DDETerminateAll statement to close all open dynamic data exchange (DDE) channels.

语法Syntax

表达式expression. DDETerminateAll

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

返回值Return Value

Nothing

注解Remarks

例如,假设您打开 Microsoft Excel 和 Microsoft Access,另一个用于检索系统信息,Microsoft Excel,另一个用于数据传输之间的两个 DDE 通道。语句可用于同时关闭这两个信道。For example, suppose you've opened two DDE channels between Microsoft Excel and Microsoft Access, one to retrieve system information about Microsoft Excel and one to transfer data. You can use the DDETerminateAll statement to close both channels simultaneously.

使用语句等效于执行为每个打开的通道编号应用语句。类似的应用语句,语句不起活动 DDE 链接的表达式在窗体或报表上的字段中。Using the DDETerminateAll statement is equivalent to executing a DDETerminate statement for each open channel number. Like the DDETerminate statement, the DDETerminateAll statement has no effect on active DDE link expressions in fields on forms or reports.

如果打开不了任何 DDE 通道,语句运行而不会导致运行时错误。If there are no DDE channels open, the DDETerminateAll statement runs without causing a run-time error.

提示Tips

  • 如果中断执行 DDE 的过程,您可能会无意中关闭通道。为避免耗尽系统资源,请使用语句在代码中或从调试窗口 (较低) 的即时窗格中调试代码执行 DDE 的过程。If you interrupt a procedure that performs DDE, you may inadvertently leave channels open. To avoid exhausting system resources, use the DDETerminateAll statement in your code or from the Immediate (lower) pane of the Debug window while debugging code that performs DDE.

  • 如果需要在 Microsoft Access 中处理其他应用程序的对象,可以考虑使用“自动化”。If you need to manipulate another application's objects from Microsoft Access, you may want to consider using Automation.

另请参阅See also

概念Concepts

Application 对象Application Object

© 2018 Microsoft