Button.OnClick Event
InfoPath Developer Reference |
Occurs when a button control is clicked within a view in a Microsoft Office InfoPath 2007 form.
Version Information
Version Added: InfoPath 2003
Syntax
expression.OnClick(pEvent)
expression An expression that returns a Button object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
pEvent | Required | DocActionEvent | An event object that is used during a Microsoft Office InfoPath 2007 button click event. |
Return Value
nothing
Remarks
This event handler does not allow users to cancel an operation.
Note |
---|
The OnClick event for the InfoPath button control is the only control event that is supported. |
Example
In the following example, the OnClick event handler is used to perform data validation on some of the fields contained in the New Customer view when a user clicks a button to switch to another view:
JScript |
---|
|
See Also