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.





Database4.zip
Patrick O'DeaAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
test this, see changes made in the module
Database4.mdb
0
 
Patrick O'DeaAuthor Commented:
Thanks,

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


0
 
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
0
 
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?
0
 
Patrick O'DeaAuthor Commented:
All seems good now.

....I should have continued investigating!

Thanks
0
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.

All Courses

From novice to tech pro — start learning today.