Form_OnValidate event

This event occurs when a form is open and the user attempts to submit it.

Syntax

Form_OnValidate ( Form )

Arguments

Form
The form object to be validated.

Remarks

You can use this event to perform tasks such validating user input for a form field. If the return value is empty string then validation is assumed to have been successful.

Example

Function Form_OnValidate(Form)
  'Write custom validation to check that the user is attempting to enter a value for ‘the Amount field that is less than 100. 
  If (CInt(Form.GetFieldValue(“Amount”)) Then
    Form_OnValidate = “Amount cannot be greater than 100.”
  End If
End Function