Sets or returns the value of the On Enter box in the Properties window of one of the objects in the Applies To list. Read/write String.
expression.OnEnter
expression Required. An expression that returns one of the objects in the Applies To list.
The Enter event occurs before a control actually receives the focus from a control on the same form.
The OnEnter 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 Enter box in the object's Properties window):
If the On Enter box is blank, the property value is an empty string.
The following example associates the Enter event with the macro "Enter_Macro" for the button named "OK" on the "Order Entry" form.
Forms("Order Entry").Controls("OK").OnEnter = "Enter_Macro"