Name

Recordset.WillChangeRecord Event — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, _
                 ByVal cRecords As Long, _
                 adStatus As ADODB.EventStatusEnum, _
                 ByVal pRecordset As ADODB.Recordset)

The WillChangeRecord event is called before an operation changes one or more records in the Recordset object.

Arguments

adReason (EventStatusEnum)

Indicates the reason for this event. Proper values for the adReason parameter are: adRsnAddNew, adRsnDelete, adRsnUpdate, adRsnUndoUpdate, adRsnUndoAddNew, adRsnUndoDelete, and adRsnFirstChange.

cRecords (Long)

Indicates how many records are affected by the operation causing this event.

adStatus (EventStatusEnum)

Indicates the status of the current operation. The adStatus parameter is set to adStatusOK if the operation causing this event was successful. If the adStatus parameter is set to adStatusCantDeny, the event cannot request that the operation be canceled. If the adStatus parameter to adStatusUnwantedEvent, this event will not be called again. If the adStatus parameter is set to adStatusCancel, a cancellation request will be made for this operation.

pRecordset

Represents the Recordset object that fired this event.

See Also

EventReasonEnum Enumeration, EventStatusEnum Enumeration, Recordset.AddNew Method, Recordset.CancelBatch Method, Recordset.CancelUpdate Method, Recordset.Delete Method, Recordset.RecordChangeComplete Event, Recordset.Update Method, Recordset.UpdateBatch Method

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.