Results 1 to 3 of 3

Thread: Advice on best method
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular gheyman's Avatar
    Join Date
    Nov 2005
    Location
    Orlando, FL USA
    Posts
    1,665
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Default Advice on best method

    I have a table with about 10 fields. What I am trying to do is keep track of data changes; What changed and when they change.

    I am thinking that when the user wants to change data that they duplicate the record and then modify the duplicate record. I have fields that show date/userId so that part of it is not where I am looking for advice. Its if I should make the user first duplicate the record.... (Note: The users views/changes data via a form.)

    Where I am a little unclear on the "duplicate" approach is how to keep the user from ever changing the prior/original "record". I would have to have it like a read only somehow.

    Any suggestion is appreciated.
    G Heyman
    Northrop Grumman - Laser Systems'
    Apopka, FL

  2. #2
    Board Regular
    Join Date
    Sep 2012
    Posts
    131
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Access: Advice on best method

    Quote Originally Posted by gheyman View Post
    I have a table with about 10 fields. What I am trying to do is keep track of data changes; What changed and when they change.

    I am thinking that when the user wants to change data that they duplicate the record and then modify the duplicate record. I have fields that show date/userId so that part of it is not where I am looking for advice. Its if I should make the user first duplicate the record.... (Note: The users views/changes data via a form.)

    Where I am a little unclear on the "duplicate" approach is how to keep the user from ever changing the prior/original "record". I would have to have it like a read only somehow.

    Any suggestion is appreciated.
    You could make an append query instead of an update auery. It would copy the contents of your form to a seperate table. This query could also include the username, computer ID, systemdate and -time.

    You could either run this query through a ”save” button on the firm, or couple it to events. For instance when closing the form or leaving the row of data.

  3. #3
    Board Regular JonXL's Avatar
    Join Date
    Feb 2018
    Posts
    216
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Access: Advice on best method

    I would opt against this approach of duplicating records and use an audit table to track changes to records. The basic idea is that everytime you modify a record, a code runs to append the old and new values of the fields that changed to an audit table along with who, when, what field, the record ID, and some way to identify the record set (form or table name, for example).

    When you want to see the changes, you can run a report on the form that filters the audit table for that record set and that record to show the history of each field and thus the record.

    I use something similar to this:

    http://www.iaccessworld.com/download...rail-database/

    Constant values (created dates) I store in a field on the record because they get displayed in the form and it's better not to have to query the huge audit table every time for that information. (Audit trails are very useful but seldom used.)

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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