اینم یه نمونه
Private Sub Form_AfterInsert()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("table1")
rs.AddNew
rs!tim = Now()
rs!action = "insert"
rs.Update
rs.Close
Set rs = Nothing
End Sub
Private Sub Form_AfterUpdate()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("table1")
rs.AddNew
rs!tim = Now()
rs!action = "update"
rs.Update
rs.Close
Set rs = Nothing
End Sub
Private Sub Form_Delete(Cancel As Integer)
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("table1")
rs.AddNew
rs!tim = Now()
rs!action = "delete"
rs.Update
rs.Close
Set rs = Nothing
End Sub
اگر unbondکار می کنید کدهای بالا را به کلید مربوطه اضافه کنید