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

ObjectFrame.OnDblClick 属性 (访问)ObjectFrame.OnDblClick Property (Access)

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

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

语法Syntax

表达式OnDblClickexpression. OnDblClick

表达式_一个表示ObjectFrame对象的变量。_expression A variable that represents an ObjectFrame object.

注解Remarks

该属性有助于以编程方式更改事件别触发时 Microsoft Access 所采取的行动。例如,在各次事件调用之间可能要根据触发事件的环境更改表达式的参数,或从一个事件过程切换到一个表达式或宏。This property is helpful for programmatically changing the action 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 clicking the Build button next to the On Dbl Click box in the object's Properties window):

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

  • 如果选择了“宏生成器”,则该值是宏的名称。If Macro Builder is chosen, the value is the name of the macro.

  • 如果选择了“代码生成器”,则该值是“[事件过程]”。If Code Builder is chosen, 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 

另请参阅See also

概念Concepts

ObjectFrame 对象ObjectFrame Object

© 2018 Microsoft