|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a DataDOM object.
|pDataDOMEvent||Required||DataDOMEvent||An event object that is used during Microsoft Office InfoPath 2007 data validation events.|
This event handler does not allow users to cancel an operation.
The OnAfterChange event is typically used for changing data in a form after other changes have occurred—for example, making calculations or changing the structure of a form's underlying XML document.
|In some cases, events related to changes in a form's underlying XML document may occur more than once. For example, when existing data is changed, an insert and delete operation occurs.|
In the following example, the OnAfterChange event handler is used to call a custom function that performs calculations: