Field_OnValidate event
This event occurs when a when user attempts to set a new value for a List or Boolean field on the form.
Syntax
Field_OnValidate FieldName , FieldValue )Arguments
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 Field_OnValidate(FieldName, FieldValue)
Field_OnValidate = ""
'Write custom validation to check that the user is attempting to enter a value for ‘the Amount field that is less than 100.
If (FieldName = “Amount”) Then
If (CInt(FieldValue) > 100) Then
Field_OnValidate = “Amount cannot be greater than 100.”
End If
End If
End Function