XDocument.OnSwitchView Event
InfoPath Developer Reference |
Occurs after a view in a Microsoft Office InfoPath 2007 form has been successfully switched.
Version Information
Version Added: InfoPath 2003
Syntax
expression.OnSwitchView(pEvent)
expression An expression that returns a XDocument object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
pEvent | Required | DocEvent | An event object that is used during a Office InfoPath 2007 merge or view switching event. |
Return Value
nothing
Remarks
This event handler does not allow users to cancel an operation.
Note |
---|
The OnSwitchView event also occurs when a form is first opened. |
Example
In the following example, the OnSwitchView event handler is used to check the name of the current view. If the view has the name "Archive Customer," data is added to the form's underlying XML document.
JScript |
---|
|
See Also