Cancels any pending updates for a Recordset object.
Syntax
recordset.CancelUpdate type
The CancelUpdate method syntax has these parts.
Part |
Description |
recordset |
An object variable that represents the Recordset object for which you are canceling pending updates. |
type |
Optional. A constant indicating the type of update, as specified in Settings. |
Settings
You can use the following values for the type argument only if batch updating is enabled.
Constant |
Description |
dbUpdateRegular |
Default. Cancels pending changes that aren’t cached. |
dbUpdateBatch |
Cancels pending changes in the update cache. |
Remarks
You can use the CancelUpdate method to cancel any pending updates resulting from an Edit or AddNew operation. For example, if a user invokes the Edit or AddNew method and hasn't yet invoked the Update method, CancelUpdate cancels any changes made after Edit or AddNew was invoked.
Check the EditMode property of the Recordset to determine if there is a pending operation that can be canceled.
Note Using the CancelUpdate method has the same effect as moving to another record without using the Update method, except that the current record doesn't change, and various properties, such as BOF and EOF, aren't updated.