Cancel any pending updates for a Recordset object.
Syntax expression.CancelUpdate(UpdateType) Key UpdateType The type of update, as specified in Settings (ODBCDirect workspaces only).
Use the CancelUpdate method to cancel any pending updates resulting from an Edit or AddNew operation.
If a user invokes the Edit or AddNew method and hasn't yet invoked the Update method, then the changes can be cancelled. The EditMode property of the Recordset will show if there is a pending operation that can be canceled.
Example
Dim db As Database Dim rst As Recordset Set dbs = OpenDatabase("Northwind.mdb") Set rst = dbsNorthwind.OpenRecordset("Employees", dbOpenDynaset) With rst .AddNew !FirstName = "Fred" !LastName = "Bloggs" .CancelUpdate End With
“Even God cannot change the past” ~ Agathon
Related:
Update - Save a recordset.
OpenRecordset - Create a new Recordset
AddNew - Add a new record to a recordset.