ComponentOne True DataControl 8.0
FieldChangeComplete Event

 

FieldChangeComplete Event

Occurs after a field value has changed.

Syntax

TData_FieldChangeComplete (ByVal cFields As Long, ByVal Fields As Variant, ByVal pError As ADODB.Error, adStatus As EventStatusEnum)

Remarks

Arguments: cFields is the number of fields that have changed their values. In True DataControl version 8.0, this is always one, but we recommend not assuming this. It is better to write general code that can accommodate changing several fields at once.

Fields is an array of ADO Field objects, which are items of the Recordset.Fields collection. In True DataControl version 8.0, it always contains one element, Fields(0). Fields(0).Name is the name of the field that has changed its value.

pError is an ADO Error object. It describes the error that occurred if the value of adStatus is adStatusErrorsOccurred; otherwise it is not set.

adStatus is an ADO EventStatusEnum value, with two possible values: adStatusOK if the operation that caused the event was successful, or adStatusErrorsOccurred if the operation failed.

The FieldChangeComplete event is a standard ADO Recordset event fired by the TData control’s Recordset. For more information, see Using recordset events. As with any ADO recordset, this event occurs after the value of one or more fields has changed. It is also fired when an operation has attempted to change one or more fields and failed. This case can be detected by the value of the adStatus argument, which is set to adStatusErrorsOccurred if the operation failed.

This event fires after TData has completed all actions necessitated by the field change. For example, suppose that A is a data field and B is a calculated field that depends on the value of A. If the user changes the value of A, the value of B will have been updated by the time the FieldChangeComplete event fires. You can use this event to perform additional processing at that point.

See Also

TData Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback