Try setting the dataset's AutoCalcFields
property to False
.
Determines when the OnCalcFields event is triggered and when lookup
field values are calculated.
Set AutoCalcFields to control when the OnCalcFields event is triggered
to update calculated fields and when lookup fields are calculated.
A calculated field is one that derives its value from the values of
one or more fields in the active record, sometimes with additional
processing. Lookup fields are fields whose values come from a
secondary dataset or lookup cache.
Note: Unidirectional datasets support calculated fields but not
unidirectional fields. For unidirectional datasets, OnCalcFields only
controls when calculated fields are updated.
When AutoCalcFields is True (the default), Lookup fields are
recalculated and OnCalcFields is triggered when:
- The dataset is opened.
- The dataset is put into dsEdit state.
- Focus moves from one visual control to another, or from one column to
another in a data-aware grid and modifications have been made to the
record.
When AutoCalcFields is False, Lookup fields are recalculated
and the OnCalcFields event occurs only when:
- The dataset is opened.
- The dataset is put into dsEdit state.
- A record is retrieved from a database.
If an application permits users to
change data, OnCalcFields is frequently triggered. In these cases an
application may set AutoCalcFields to False to reduce the frequency
with which the OnCalcFields event occurs and with which lookup values
are fetched.
Also the field's LookupCache
property might help you.