Solved

My Audit Trail

Posted on 2011-03-01
5
376 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

839 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