?
Solved

My Audit Trail

Posted on 2011-03-01
5
Medium Priority
?
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 35012892
test this, see changes made in the module
Database4.mdb
0
 

Author Comment

by:Patrick O'Dea
ID: 35012939
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
ID: 35012952
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
ID: 35013073
(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
ID: 35013226
All seems good now.

....I should have continued investigating!

Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

649 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