This event occurs when a List or Boolean field value on the form has changed.
SyntaxForm_OnChange ( Form , FieldName , FieldValue )
- The form object.
- The name of the field.
- The value of the field.
You can use this event to perform tasks such as populating other form field values based on the changed field value.
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