Share via

Logging updates to database

Anonymous
2024-05-28T19:40:25+00:00

Is there an easy way to log any changes to the fields in my main table? I've seen a few videos on Youtube, but most of them are older versions of Access.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2024-05-29T12:34:40+00:00

    John,

    See my sample database showing audit trail with data macros.

    Data macros can handle changes whether initiated from query, form, vba or direct table manipulation.

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2024-05-29T11:04:26+00:00

    You might find my blog on Audit Trail with data Macros helpful (see below for blog address.)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-05-29T10:22:53+00:00

    Is there an easy way to log any changes to the fields in my main table? I've seen a few videos on Youtube, but most of them are older versions of Access.

    Hi John,

    I use a very simple way to handle this problem.

    I catch the value of the Control in the Enter event, and compare it with the value in the Exit event. If there is a difference, you can log it, including the "Enter"-values and "Exit"-values, and other specifics.

    The problem with Access-forms is - in my opinion - that they are far too static. But I think It is relatively simple to make them more dynamically on this point (and on many other points).

    Imb.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-05-28T21:48:32+00:00

    You might like to take a look at ChangedRecordDemo.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    This little demo file includes an option to open a 'Form to Copy Previous Data to Audit Table', which illustrates a methodology for doing this.  This differs from most audit trail solutions you'll come across in that it only logs actual changes to the values of data in the table, rather than merely logging updates.  An update can occur without any of the values at the column positions in a row being changed.

    The method used is to temporarily store the values in one array before a row is edited, then in another row after it is edited, and to then compare the two arrays.  Values which have changed are identified in a subform by using conditional formatting to highlight those column positions.

    Was this answer helpful?

    0 comments No comments
  5. George Hepworth 22,855 Reputation points Volunteer Moderator
    2024-05-28T21:16:15+00:00

    Nothing in Access has changed which should have significant impact on most (or nearly all) logging procedures. Pick one that seems accessible to you and implement it. See how it works out. If you have trouble, you could ask specific questions about specific issues.

    I will say that Data Macros are a very effective method of logging updates because they always fire when a value in a field in the table with Data Macros is updated, making it very difficult to bypass your logging protocol. Give preference, therefore, to methods using Data Macros.

    Was this answer helpful?

    0 comments No comments