NavigationButton.OnDblClick 属性 (Access)NavigationButton.OnDblClick property (Access)

设置或返回 属性 窗口中 双击 框的值。Sets or returns the value of the On Dbl Click box in the Properties window. 读/写 StringRead/write String.

语法Syntax

表达式OnDblClickexpression.OnDblClick

_表达式_一个代表**NavigationButton** 对象的变量。expression A variable that represents a NavigationButton object.

备注Remarks

此属性有助于以编程方式更改在触发事件时 Microsoft Access 所采取的操作。This property is helpful for programmatically changing the action that Microsoft Access takes when an event is triggered. 例如,在各次事件调用之间可能要根据触发事件的环境更改表达式的参数,或从一个事件过程切换到一个表达式或宏。For example, between event calls you may want to change an expression's parameters, or switch from an event procedure to an expression or macro, depending on the circumstances under which the event was triggered.

当用户按下并释放鼠标左键两次在系统双击时间限度内的对象时, DblClick 事件发生。The DblClick event occurs when a user presses and releases the left mouse button twice over an object within the double-click time limit of the system.

根据 "选择生成器" 窗口 (在对象的 "属性" 窗口中选择 "双击" 框旁的 "生成" 按钮即可访问该窗口**** ) 中所选内容的不同, OnDblClick值将为下列值之一:The OnDblClick value will be one of the following, depending on the selection chosen in the Choose Builder window (accessed by choosing the Build button next to the On Dbl Click box in the object's Properties window):

  • 如果选择 "表达式生成器", 则值将为_表达式_, 其中_Expression_是 "表达式生成器" 窗口中的表达式。If you choose Expression Builder, the value will be =expression, where expression is the expression from the Expression Builder window.

  • 如果选择 "宏生成器", 则值是宏的名称。If you choose Macro Builder, the value is the name of the macro.

  • 如果选择 "代码生成器", 则值将为 [事件过程]。If you choose Code Builder, the value will be [Event Procedure].

如果****“双击”框为空,该属性值为空字符串。If the On Dbl Click box is blank, the property value is an empty string.

示例Example

下面的示例将Click事件与 "订单输入" 窗体上名为 "确定" 的按钮的OK_DblClick事件过程相关联 (如果当前没有关联)。The following example associates the Click event with the OK_DblClick event procedure for the button named OK on the Order Entry form, if there is currently no association.

With Forms("Order Entry").Controls("OK") 
 If .OnDblClick = "" Then 
 .OnDblClick = "[Event Procedure]" 
 End If 
End With 

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.