Creating an Audit Log

  • Thread starter Thread starter John Conklin
  • Start date Start date
J

John Conklin

Hello all,

I found this wonder bit of information on Allen Browne's website dealing
with the subject above.
http://members.iinet.net.au/~allenbrowne/AppAudit.html

I have followed all the instructions to the letter, but it is not working
correctly for me.

I keep getting an error message that there is an error in my from clause,
and when I step through the code it looks correct to me.

As anyone had any luck using this solution? If so were there any problems
or things I might have missed when implementing.

Thanks
~John Conklin
 
i implemented Allen's solution awhile back, and all ran smoothly; i don't
recall having to "fix" anything. suggest you post the line of code that is
erring out, maybe somebody will spot the problem.

hth
 
Thanks Tina,

Here is where the error log is saying the problem is:

If Not bWasNewRecord Then
sSQL = "INSERT INTO " & sAudTmpTable & " ( audType, audDate,
audUser ) " & _
"SELECT 'EditFrom' AS Expr1, Now() AS Expr2, NetworkUserName()
AS Expr3, " & sTable & ".* " & _
"FROM " & sTable & " WHERE (" & sTable & "." & sKeyField & " = "
& lngKeyValue & ");"
db.Execute sSQL, dbFailOnError

I get an error in my FROM clause.

~John
 
I figured out what the problem was.

Who ever created the database I am working on has all the table names with
spaces in the name like TBL - Header.

Once I changed the table name to tblHeader the code worked fine, and did
exactly what it was supposed to do.

Thanks
~John
 

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

Creating An Audit Log 1
Audit Log 1
audit log 2
Audit Trail Error 5
Audit Log 6
A question on Allen Browne's Audit trail procedure? 2
Allen Browne Help me with Audit log 14
Allen Browne Audit Log 2

Back
Top