Audit Trail for MS Access 2003 Database

G

Guest

Does anyone have any suggestions on a program or code that I can use to Audit
the additions and changes made to my database? There will be about 8 users
and I would like to know when and who made changes or additions to the
database.

Thanks
 
A

Allen Browne

Access does not provide logging information, and has no triggers, so you
cannot set this up automatically.

However, if all changes are made through forms, you can use the events to
the forms to log the inserts, deletes, and edits. Details in:
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html
 
A

Allen Browne

If you have stored the functions in a standard module (one you see on the
Modules tab of the Database window), then, yes, you can reuse them in any
form. Each form does need:
Dim bWasNewRecord As Boolean
at the top of its module.

The error message suggests that the form's module is unable to resolve one
if the names. If it is not the bWasNewRecord, is there a control named
NumberA?

Are the Name AutoCorrect boxes unchecked under:
Tools | Options | General
These can sometimes get Access confused about what things are called.
 
G

Guest

The Dim statement is at the top of each form module.
The NumberA was the IDNumber the primary key of the table being audited. I
made some modifications and changed a few things around and it is working
right now. I'm not sure what I did but I will try to reproduce it. There
are still 2 more tables to do.

Thanks for the help. It is a nice tool.
 
G

Guest

All I can figure is that I am missing something very basic. Every time I try
to add a new table I have to fight with it for a coulpe of days for it to
work. With the new table I am getting "Compile Error: Method or data member
not found." It is on the BeforeUpdate line and it was copied from your page
chenging only the variable names. The Dim statement is at the top of the
code page. I dont understand - I fugure after a couple of weeks I'll have it
all nailed down one way or another.

Thanks for the help.
 
G

Guest

Hi there, I have 'borrowed' your audit trail, and attempted to install it
into my database (the one i was usinging did not continue adding to the AT
after the initial records were entered)...anyway, I thought i would give this
one a go, However...initialy you suggest saving the module as
'jbaudit'....the problem is, when I do that, i actually ahve 4 seperate
modules to save, not 1 ?....is this going to matter too much?.....ie
jbaudit1, 2 , 3 and then 4?,

Excuse my ignorance, please.....i am battling with not enough knowledge and
alot of pressure to make this work!
 
A

Allen Browne

On the Modules tab of the Database window in your database, click the New
button. Access opens a new code window. Paste in all the code in this link:
http://allenbrowne.com/AppAuditCode.html
Save the module with a name such as "abjAudit".
There are several functions, but they can all go in the one module.

You can then set up the tables as instructred, and call the function from
the events of your form.

You will need some understanding of queries and code to get this working.
 
G

Guest

ok thanks for the clarification....when i get the 'save' option,ie, do you
want to save?, click yes, then it lists 3 modules, and this is the bit that
confuses me?...how do i overwrite to make it save as a single module only ?
 
G

Guest

ahhh!! got it!...i used 'save*****" under file as opposed to the 'save' icon...
thank you!
 
G

Guest

I appear to have a few errors in the module, but the very first is a 'comoile
error expected'...where it highlights allen brownes surname?....help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top