Access 2003 - audit trail. tracking changed or deleted records to a table.

Access 2003.  Re : Microsoft's article No. 197592 re How to create an audit trail of record changes in a form in Access 2000.
I tried this code.  And in No.7 of the steps, I inserted in the BeforeUpdate the syntax =AuditTrail().
But I get a Compile Error which says : Expected; line No or Label or Statement or End of Statement

This question is in 2 parts.  One is to check out the mentioned  Microsoft suggested solution and the 2nd part is finding a simple solution to capture any records that were changed in a Form.  the changed records could be stored in a separate table.  

Can someone please check the Microsoft suggested solution  out and let me know how to implement this.

What I did:  Following the steps, I created a field in the Table which was to be audited.  The field was named Updates and is a Memo field.  Then in the Form's BeforeUpdate event of the form, I typed =AuditTrail().  I have a command button that will delete a record and when I clicked on the command button  I got the  error message. Compile Error which says : Expected; line No or Label or Statement or End of Statement

I want something simple that would work.  I tried Allen Browne's code but it did not work either and I appreciate his response that it would be impossible or not feasible to support Free stuff.  So I am abandoning his solution and am trying for something that would be simple.

  I just want to capture in a separate table any records that were changed or deleted when viewed through a form.  
Thanks.
jegajothyretiredAsked:
Who is Participating?
 
harfangCommented:
This is the code jegajothy is using:

How to create an audit trail of record changes in a form in Access 2000
http://support.microsoft.com/kb/197592

The function AuditTrail() compiles fine as is (without any additional libraries) and will effectively write the audit information in the field Updates.

Possible problems:
You didn't follow this to the letter:

    4. Save the Module as Module1 and close the Visual Basic Editor.

If you named your module 'AuditTrail', that would conflict with the function name.

You have another problem in your "delete" command button. Does your code compile? From VB, use (Debug | Compile <project name>)

(°v°)
0
 
mbizupCommented:
>  =AuditTrail()
Is that the entire syntax you are using for this line of code?  Is it in the actual VBA code, or just in the property sheet?

If it is in the VBA Code...

Hazarding a guess, either drop the = sign and parentheses:

AuditTrail

or assign it to some value

Dim SomeValue as Variant
SomeValue = AUditTrail()
0
 
Rey Obrero (Capricorn1)Commented:
post the codes that you are *using*
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Rey Obrero (Capricorn1)Commented:
per m$   =AuditTrail()  should be in the property sheet BeforeUpdate event
0
 
mbizupCommented:
>One is to check out the mentioned  Microsoft suggested solution and the 2nd part is finding a simple solution to capture any records that were changed in a Form.  the changed records could be stored in a separate table....

These are seperate topics, and should be posted as seperate EE questions.
0
 
jegajothyretiredAuthor Commented:
Please have a look at the Microsoft article and offer the solution.  Thanks.
0
 
Rey Obrero (Capricorn1)Commented:
jegajothy,
we know about the m$ link.

what we want to see  is the codes you are using.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.