FieldName event

This event occurs when a when user attempts to set a new value for a field on the form.

Form_OnLoad ( fieldname , fieldvalue )
Argument Description
fieldname The name of the field that requires validation.
fieldvalue The value of the field that requires validation.

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 then 100.
  If (FieldName = ”Amount”) Then
    If (CInt(FieldValue) > 100) Then
      Field_OnValidate = ”Amount cannot be greater than 100.”
    End If
  End If
End Function