View.SwitchView Method
InfoPath Developer Reference |
Changes the active view of a Microsoft Office InfoPath 2007 form to a specified view.
Version Information
Version Added: InfoPath 2003
Syntax
expression.SwitchView(bstrName)
expression An expression that returns a View object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
bstrName | Required | String | The name of the view to switch to. If an empty string is used, the default view is displayed. |
Return Value
Nothing
Remarks
If an empty string is used as the
bstrName
parameter, the view is changed to the default view of the form.
Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
Example
In the following example, the SwitchView method of the View object is used to change the current view to the default view:
JScript |
---|
|
See Also