Button_OnClick event

This event occurs when a button field on a form is pressed.

Button_OnClick ( form , buttonname )
Argument Description
form The form object.
buttonname The name of the button field.

Remarks

You can use this event to perform tasks such as populating other form field values.

Example

Sub Button_OnClick(Form, ButtonName)
  'Write custom code to lookup the user's home directory.
  If (ButtonName = "MyButton") Then
    Form.SetFieldValue "Path", LookupHomeDirectory(Form.UserName)
  End If
End Sub