Delete

This method deletes the current record in an open Recordset object.

Syntax

recordset.Delete AffectRecords

Parameters

AffectRecords
Optional. The only valid value for AffectRecords is 1 (adAffectCurrent). Any other value generates a run-time error. This feature is present for compatibility with ADO for the desktop computer.

Remarks

Using the Delete method deletes the current record from the database. If the Recordset object does not enable record deletion, an error occurs.

Retrieving field values from the deleted record generates an error.

A deleted record remains current until you move to a different record, after which the deleted record is no longer accessible. If the attempt to delete records fails, a run-time error occurs.