Full Version: Audit Form
UtterAccess Forums > Microsoft® Access > Access Forms
Ggilmann
Hi everybody!
I'm using Allan J Browne's audit log code provided on his site (thank god for allan browne) to track changes to my database. It works perfectly, I've got a couple of audit tables tracking changes to different tables. Now, I want to put the changes on a form so a user can see all the changes done. I made a query which assembles the "EditFrom" and "EditTo" records by corresponding pairs, and made a form based on that query.
Now my initial idea is to display only the modified fields, with the old and new value. I can't figure out how to do this. I thought initially to display all controls and then make visible/invisible depending on wheter the before and after value are the same or not. Somehow this seems pretty complicated, and besides I don't think it would work on a continuous form.
Does anyone have any idea how to make this, in a simple way if possible.
Anyhow, I'm not sure I'm making myself clear. So if someone can help me I'll try to be more precise.
Thanks,
Ggilmann
AQM_UK
Well to to confess not UTD with Allan Brownes" code.
But I take t the tranaction is stored with a date.
So, you do a max date on the key, which is you last value and you can do a compare on this.
Jim
Ggilmann
The transaction is saved with a date. The way it does it is that it stores the whole before record and the whole after record. So there's a lot of fields which can be the same value (If not modified). I want to hide those identical fields so that only the different one are showed.
The way i'm doing it right now is cycling through all the controls, checking if the before and after value are the same then making it visible or invisible accordingly. I've put all this in a current event. This way doesn't work for a continuous form since it hides all the controls for all the records...
I guess I could go for a singe form view but I was hoping to get a report feel to my form.
By the way, what's UTD (I'm pretty new to this board and access )
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.