Recordset.CancelUpdate Method
Access Developer Reference |
Cancels any pending updates for a Recordset object.
Syntax
expression.CancelUpdate(UpdateType)
expression A variable that represents a Recordset object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
UpdateType | Optional | Long | Set to one of the UpdateTypeEnum values.
Note
The dbUpdateRegular and dbUpdateBatch values are valid only if batch updating is enabled.
|
Note | |||
The dbUpdateRegular and dbUpdateBatch values are valid only if batch updating is enabled. |
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.
Example
This example shows how the CancelUpdate method is used with the AddNew method.
Visual Basic for Applications |
---|
|
This example shows how the CancelUpdate method is used with the Edit method.
Visual Basic for Applications |
---|
|
See Also