Sets or returns the value of the On Activate box in the Properties window of a form or report. Read/write String.
expression.OnActivate
expression Required. An expression that returns one of the objects in the Applies To list.
The Activate event occurs when the form or report receives the focus and becomes the active window.
The OnActivate 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 Activate box in the form or report's Properties window):
If the On Activate box is blank, the property value is an empty string.
The following example associates the Activate event with the macro "Activate_Macro" for the "Order Entry" form.
Forms("Order Entry").OnActivate = "Activate_Macro"