I have been using the great guide at https://www.fontstuff.com/access/acctut21.htm to create an Audit Log in TblAuditTrail in my example database. This allows me to track any fields that have been tagged with "Audit" in the Tag property.
The code below is the snippet which is added to the Form's Before Update event and this is working when added to FrmOverview's Before Update Event (this is the Master Form), however this does not seem to be working for the Sub-Forms (FrmSubChangerProgramme, FrmSubGeneralInformation and FrmSubReplacementProgramme) when I add it to their respective Before Update Events.
The code below is the snippet which is added to the Form's Before Update event and this is working when added to FrmOverview's Before Update Event (this is the Master Form), however this does not seem to be working for the Sub-Forms (FrmSubChangerProgramme, FrmSubGeneralInformation and FrmSubReplacementProgramme) when I add it to their respective Before Update Events.
Code:
If Me.NewRecord Then
Call AuditChanges("PartID", "NEW")
Else
Call AuditChanges("PartID", "EDIT")
End If