Returns an EditModeEnum value that defines the editing status of the current record.
The EditMode property returns one of the EditModeEnum constants that describes the
editing status of the current record.
ADO stores this editing status information in an editing buffer.
If you move to a current record that has been previously deleted
or if you arrive at BOF or EOF, this property will return an error.
EditModeEnum Constants
Constant | Value | Description |
---|---|---|
adEditAdd | 2 | The current record is new and has been added using the AddNew method but is not saved in the database |
adEditDelete | 4 | The current record has been deleted |
adEditInProgress | 1 | The current record has been changed but not saved in the database |
adEditNone | 0 | The current record is not being edited |
If objRecordset.EditMode = adEditInProgress Then
If MsgBox("New Record Added", vbYesNo) = vbYes
objRecordset.Update
Else
objRecordset.CancelUpdate
End If