Audit Trail / History
Posted on 2005-05-12
I realize that this question has been asked and answered many times and I am aware of the different approaches previously suggested but I think I have a fresh approach and would like to hear everyone's thoughts.
Basically I will be using a class object to register my forms with that will hook the AfterUpdate, AfterInsert, AfterDelete events and write the data along with a timestamp to a seperate History database.
I already have a function called myOpenForm which is a wrapper around the DoCmd.OpenForm that adds the form to the myForm and myForms classes and then calls the DoCmd.OpenForm. I can expand the myForm class to hook the events and write to history but am thinking that I need the equivalent of a Msys table to track which forms I need to track history on and I think I am going to need to write additional code to see if the form has subforms and adds them to the myForm / myForms class tree.
I am still in the early stages of thinking about this and wonder if I should expand to having myControl and myControls classes tree'd to the myForm class so I can iterate values and only write history if there really was a change or if the .Value and .OldValue going to give accurate returns?