I am inserting records into a Change History table when a record is deleted from a form (using the Delete button on the keyboard). Yet, when deleting the record, Access doesn't seem to know what record is being deleted.
How do I access information about the record being deleted? I have the following code in VB:
Private Sub Form_BeforeDelConfirm (Cancel As Integer, Response As Integer)
Dim db As DAO.Database
Set db = CurrentDb()
db.Execute "INSERT INTO ChangeHistory (RecordID, DateDeleted) VALUES ( '" & _
me.RecordID & "', Now())"
How can I access the RecordId of the record being deleted?