Audit Trail Error

G

Guest

I've been trying to get the Audit Trail code to work the last couple of days
and have followed the instructions on http://allenbrowne.com/AppAudit.html

I've checked the module code and the form code and fixed all the bugs I've
seen from other posts. But I keep getting an error that it can not find my
audID field in the statement : Call AuditEditBegin("Contacts",
"AudTmpContacts", "audID", Nz(Me!audID, 0), bWasNewRecord)

If anyone one has experience with this Audit Trail code I would appreciate
some input.

Thanks,
 
A

Allen Browne

Do you really have a field named "audID" in your form?

If so, it is not going to work with that code, because it uses that field
name for a special purpose in the audit table. Rename your key field to
something else.

If your key field is actually called something like ContactID, use:
Call AuditEditBegin("Contacts", "AudTmpContacts", "ContactID", _
Nz(Me!ContactID, 0), bWasNewRecord)
 
G

Guest

Hi Allen,

Thanks for the tip...I figured it was going to be something crazy like that.
It looks like its going to be a great tool for us. Thanks for sharing the
code.
 
G

Guest

Hi again Allen,
Thanks for your help, the Audit Trail works fine now. I mis-read your
instructions and had the audID switched with the primary key on our Contacts
table. Have a Merry Christmas and Happy New Year down-under!
 

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

Top