Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Jun 2005
    Posts
    102

    Unanswered: Creating Audit Logs

    What are the steps in creating Audit Logs? Do I have to write my own login table for users? If so, how do I call the name from that table to appear on a record that, that user has modified? I know someone out there has done this already, please help. I have a custom made application and I want to log who's changing/adding records to the my tables.

  2. #2
    Join Date
    Jun 2004
    Posts
    27
    HI
    Did u Try Templates There's One Called Ledger,
    Isn't what u r looking for?

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by rodrunner79
    What are the steps in creating Audit Logs? Do I have to write my own login table for users? If so, how do I call the name from that table to appear on a record that, that user has modified? I know someone out there has done this already, please help. I have a custom made application and I want to log who's changing/adding records to the my tables.
    Plenty of people have ... I have not. It can be a massive undertaking depending on the level of detail desired for your audit trail... How much detail are you looking for? Do you want to log each and every field change in every table?
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by M Owen
    Plenty of people have ... I have not. It can be a massive undertaking depending on the level of detail desired for your audit trail... How much detail are you looking for? Do you want to log each and every field change in every table?

    In a way, YES... But being able to log who created/imported/appended/updated this record is fine. I don't need to log everyfield. Just as long as it can log the username that modified a record.

  5. #5
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by wahoud
    HI
    Did u Try Templates There's One Called Ledger,
    Isn't what u r looking for?

    Ledger? That's just another type of database. I already have a database.
    What I need is a way to log users that edit records from my tables.

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by rodrunner79
    Ledger? That's just another type of database. I already have a database.
    What I need is a way to log users that edit records from my tables.
    Well here is what I do: I have 2 columns at the end of most of my tables called LastModified and UserID. When anyone updates or saves a record I put the timestamp and the user'd login ID in those columns as part of the update/save procedure ...

    Do you want to keep a history of update/save activity for each record? If so, you'll have to create a separate Transaction History table to do that ...
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Jan 2005
    Posts
    31
    Quote Originally Posted by rodrunner79
    What are the steps in creating Audit Logs? Do I have to write my own login table for users? If so, how do I call the name from that table to appear on a record that, that user has modified? I know someone out there has done this already, please help. I have a custom made application and I want to log who's changing/adding records to the my tables.
    Check out: http://allenbrowne.com/AppAudit.html. It may (or may not) be of some use.

  8. #8
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by M Owen
    Well here is what I do: I have 2 columns at the end of most of my tables called LastModified and UserID. When anyone updates or saves a record I put the timestamp and the user'd login ID in those columns as part of the update/save procedure ...

    Do you want to keep a history of update/save activity for each record? If so, you'll have to create a separate Transaction History table to do that ...

    Owen, do you have a sample database that I can see. If so, can you send it to me at rodrunner79@sbcglobal.net

    I just need to see how it works.

  9. #9
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by rodrunner79
    Owen, do you have a sample database that I can see. If so, can you send it to me at rodrunner79@sbcglobal.net

    I just need to see how it works.
    Sample db to see what? Transaction history? I haven't written that ... I know how to write it (as stated previously). As for the Last mod and userID, no sample is necessary ... Tack them on to the end of your table ... THen when you write out a record (or update one for that matter) you sety those columns to Now() and CurrentUser() respectively ... You want to see some sample code on doing that?
    Back to Access ... ADO is not the way to go for speed ...

  10. #10
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    If you REALLY want to complicate things, you could stuff the entire record into an OLE field as a binary stream. That way you only require one field to track anything. Of course, getting the data back out is a bit trickier...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  11. #11
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by M Owen
    Well here is what I do: I have 2 columns at the end of most of my tables called LastModified and UserID. When anyone updates or saves a record I put the timestamp and the user'd login ID in those columns as part of the update/save procedure ...

    Do you want to keep a history of update/save activity for each record? If so, you'll have to create a separate Transaction History table to do that ...
    You're saying, you inserted/added two fields at the end of your tables. And in those fields you specified a default value, so every record created is stamped with username and time. What default value did you use for the user field? I can't seem to get =CurrentUser() to work. Access is saying, function do not exist.

  12. #12
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by chris_n_osborne
    Check out: http://allenbrowne.com/AppAudit.html. It may (or may not) be of some use.
    Hey thanx Chris, great help... I will read more on it to fully understand it though. I'm really not a VB person. Just started learning. Thanks again.

  13. #13
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by rodrunner79
    You're saying, you inserted/added two fields at the end of your tables. And in those fields you specified a default value, so every record created is stamped with username and time. What default value did you use for the user field? I can't seem to get =CurrentUser() to work. Access is saying, function do not exist.

    Your Access version???? Also, HOW are you trying to write this value?
    Back to Access ... ADO is not the way to go for speed ...

  14. #14
    Join Date
    Jun 2005
    Posts
    102
    Quote Originally Posted by M Owen
    Your Access version???? Also, HOW are you trying to write this value?
    Nevermind, I know where to insert it. Thanks

  15. #15
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by rodrunner79
    Nevermind, I know where to insert it. Thanks
    Please enlighten others as to how you did it ... It helps prevent (at least somewhat) duplication of questions and effort ... My reason for asking is this can be done different ways with different versions ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •