Sample data · this browser only

Audit trail

Web twin of AuditTrailSample.accdb. Same tables: tblNotes, tlkpNoteStatus, tblAuditLog. Saves write the note and the field-level log together. Data macros stay in Access.

localStorage (this browser only) · Download the Access file · Shared D1 sandbox · What this demo shows · Demos

Audit trail sample (fmnuMain)

Open a list to work. Choices are this demo’s answers, not a product spec.

The Microsoft Access file

Nifty Access pages are usually web forms. This sample also ships as a real .accdb you can open in Access 2010+.

AuditTrailSample.zip

Unzip and open AuditTrailSample.accdb. If Access shows a yellow bar, enable content so data macros and Body logging can run.

Follow along in Access

These shots are the real Access window after we opened the file and added Sample note A and B from code (the same AddNew path the data macros watch).

  1. Access startup form fmnuMain with Notes, History, and Sample choices buttons
    1. Menu (fmnuMain). Notes opens the form. History is read-only. Sample choices are this demo’s Q1–Q8, not a product spec.
  2. frmNotes showing Sample note A, Open status, Body text, last-touch stamps, New Save Delete History
    2. Notes (frmNotes). Change Title or Status and Save — data macros write the log even from the table datasheet. Change Body on this form — that path is VBA on the txtBody box, not the field name Body. Created/Updated boxes are last-touch metadata, not the trail. History opens the log for this record.
  3. frmAuditHistory datasheet with Insert Title Sample note A
    3. History (frmAuditHistory). Read-only. One row per changed field. If When shows hashes, drag that column wider — the date is there. Body is not logged on datasheet/DAO; it is logged when you edit it on the form.

What this demo shows

Browser copy of the Access audit-trail sample. Same field names as tblNotes / tblAuditLog. Data lives in this browser only. The Access zip is the desktop file.

  • Write wrapper — Save writes the note and the log together. Access data macros are not on the web.
  • Field-level trail — old value, new value, when, who (sample-clerk).
  • Body is logged here — every save goes through the form. Access data macros still skip Long Text.
  • No-op save — unchanged fields write no log rows.
  • Lookup not auditedtlkpNoteStatus is not in the log.
  • History is read-only — one record’s tab, or all rows from the menu.
  • Last-touch columns — Created / Updated on the live row, labelled as metadata.
  • Unsaved changes — Yes / No / Cancel before leaving a dirty record.

Will this work when the data is in a database?

Yes. The same tables would sit in D1 (or similar). The save would insert the note and the log rows in one batch. Data macros would not be ported.

Sample data only. This page is this browser. Shared D1: /demo/audit-trail-db/. Desktop Access: AuditTrailSample.zip.