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