Solved

My Audit Trail

Posted on 2011-03-01
5
346 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Patrick O'Dea
  • 4
5 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
test this, see changes made in the module
Database4.mdb
0
 

Author Comment

by:Patrick O'Dea
Comment Utility
Thanks,

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


0
 

Author Comment

by:Patrick O'Dea
Comment Utility
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
 

Author Comment

by:Patrick O'Dea
Comment Utility
(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
 

Author Closing Comment

by:Patrick O'Dea
Comment Utility
All seems good now.

....I should have continued investigating!

Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now