Form Events

There are six form events:

  • OnLoad— Occurs when a document is loaded.

  • OnClick— Occurs when a button form control is clicked.

  • OnSwitchView— Occurs when a user switches views or the appearance of a view is changed.

  • OnSubmitRequest— Occurs when the user attempts to submit the XML data from a form.

  • OnVersionUpgrade— Occurs when there is a mismatch between the version of a form (.xml file) and its corresponding form template (.xsn file).

  • OnAfterImport— Occurs after a form has been merged with another form.

Each of these events is described in the following sections.

The OnLoad Event

The OnLoad event occurs after a form has been loaded, but before the default view has been initialized. Thus, the OnLoad event gives the developer the opportunity ...

Get Microsoft® Office InfoPath™ 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.