Log User Changes

Ineedcoffee

Registered User.
Local time
Today, 16:10
Joined
Aug 25, 2009
Messages
32
Hi, I am wanting to log the changes made to a customer record against a username. I have created a login form so the database stores the employee's name as a tempvar.

I believe I would have to create a tempvar for every field in the forms I have (this would be approx 80 fields) and then when a field is updated it runs a macro that logs the field name and user name.

I have no real idea if this would work or if there is a much easier way of doing it.

Any help would be greatly appreciated.


Thanks.
 
The easiest way is to enumerate throught he controls on the form comparing the .Oldvalue to the .Value if different then log changes. This would need to be done on the form before update event. Do you really need to log the changes made to any field in the table, surely, only significant ones need testing.
 
Hi Dcrake,

Thanks for the reply. I have two real options, one is to log any field changes (which is what our management team want) or to just log any changes to the fields within the subform.

A bit more info, the main section of the database is a datasheet with a hyperlink on the customer reference number, this then opens a form with 7 subforms (using pages). I believe it would be sufficient only to log those changes made on each subform.

How would I do this? Do you have to set each field up separately or can I set a sort of global condition if a field was updated on the subform?

Thanks again.
 
Without going into the bare bones of the solution there are many posts on this matter on the forum do a search on audit logs, etc.
 

Users who are viewing this thread

Back
Top Bottom