I'm making progress.
I'm using the link for Allen Browne's Audit Logger. I'm trying to make it log changes to a subform, but its not working. I'm using the BeforeUpdate and AfterUpdate events of the subform, from the main form, like this:
Code:
Option Compare Database
Dim bWasNewRecord As Boolean
Private Sub frmSubAddEquipment_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("tblEquipment", "audTmpEquipment", "audTmpEquipmentID", Nz(Me!frmSubAddEquipment.Form!txtEquipmentPK, 0), bWasNewRecord)
End Sub
Private Sub frmSubAddEquipment_AfterUpdate()
Call AuditEditEnd("tblEquipment", "audTmpEquipment", "audEquipment", "audEuipmentPK", Nz(Me!frmSubAddEquipment.Form!txtEquipmentPK, 0), bWasNewRecord)
End Sub
It doesn't appear to be firing at all. It gives me no error messages and nothing is in the audit tables. I have tried placing this code directly in the subform (frmSubAddEquipment), but I get the same result.