• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

My Audit Trail

I have spent some time developing an audit trail.
Any change to a table will be recorded.

The audit trail actually ended up looking like the one that can be found on the Microsoft website.  However, I developed my own and understand it!

All was working well until I transferred the audit code into a "Module".
It is now crashing. (For Each ccont In Myform.Controls).

I don't know why ??
(It is probably fairly fundamental as I am not very experienced).

To demonstrate look at this simple database and amend and save a record in form1.

Patrick O'Dea
Patrick O'Dea
  • 4
1 Solution
Rey Obrero (Capricorn1)Commented:
test this, see changes made in the module
Patrick O'DeaAuthor Commented:

However, the field (in table staff) "Auditmemo" is still blank.
I had expected it to have the audit of the changes.

Patrick O'DeaAuthor Commented:
I should add that I made several changes to the data via the form.

None of these changes are shown in the "Auditmemo" field
Patrick O'DeaAuthor Commented:
(Sorry folks I am not expecting you to do my debugging!)

However, in Module1 the line

MyForm.AuditMemo = addstr & MyForm.AuditMemo

... does NOT seem to write back the data to the Staff table.

The  MyForm.AuditMemo field has the correct data but it is NOT writing to the staff table.

Any thoughts?
Patrick O'DeaAuthor Commented:
All seems good now.

....I should have continued investigating!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now