Field_OnChange event

This event occurs when a List or Boolean field value on the form has changed.

Syntax

Form_OnChange ( Form , FieldName , FieldValue )

Arguments

Form
The form object.
FieldName
The name of the field.
FieldValue
The value of the field.

Remarks

You can use this event to perform tasks such as populating other form field values based on the changed field value.

Example


Sub Field_OnChange(Form, FieldName, FieldValue)
  'Write custom code to lookup the user’s home directory.
  If (FieldName = “UserName”) Then
    Form.SetFieldValue “Path”, LookupHomeDirectory(FieldValue)
  End If
End Sub