Sets or returns the value of the Before Insert box in the Properties window of a form. Read/write String.
expression.OnInsert
expression Required. An expression that returns one of the objects in the Applies To list.
Although the name of this property is OnInsert, setting this property actually sets the value of the Before Insert box.
The BeforeInsert event occurs when the user types the first character in a new record, but before the record is actually created.
The OnInsert 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 Before Insert box in the form's Properties window):
If the Before Insert box is blank, the property value is an empty string.
The following example prints the value of the OnInsert property in the Immediate window for the "Order Entry" form.
Debug.Print Forms("Order Entry").OnInsert