Occurs when an application recalculates calculated fields.
Write an OnCalcFields event handler to take specific action when an application recalculates calculated fields. A calculated field is one that derives its value from the values in one or more fields in the dataset, sometimes with additional processing.
When the AutoCalcFields property is True, OnCalcFields is triggered when:
When the AutoCalcFields property is True, an OnCalcFields event handler should not modify the dataset (or a linked dataset if it is part of a master-detail relationship), because such modifications retrigger the OnCalcField event, leading to recursion.
If an application permits users to change data, OnCalcFields is frequently triggered. To reduce the frequency with which OnCalcFields occurs, set AutoCalcFields to False. When AutoCalcFields is False, OnCalcFields is not called when changes are made to individual fields within a record.
When the dataset is the master table of a master-detail relationship, OnCalcFields occurs before detail sets have been synchronized with the master table.