Sets or returns the value of the On Close box in the Properties window of a form or report. Read/write String.
expression.OnClose
expression Required. An expression that returns one of the objects in the Applies To list.
The Close event occurs when a form or report is closed and removed from the screen.
The OnClose 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 Close box in the form or report's Properties window):
If the On Close box is blank, the property value is an empty string.
The following example prints the value of the OnOpen property in the Immediate window for the "Purchase Order" report.
Debug.Print Reports("Purchase Order").OnClose