VaughanM
asked on
Accumulate Data
A Combo box allows changes in the status recorded for each record in a table (A).
I would like to accumulate a historical record of what's been changed, and when. So I want to set up a new table(B), containing 3 fields: an index(to link back to the main table A), the new status, and the date/time when it happened.
What would be the best trigger for an event associated with the Combo box? And what code will enable me to create a new record each time for the table B?
Thanks,
Vaughan
I would like to accumulate a historical record of what's been changed, and when. So I want to set up a new table(B), containing 3 fields: an index(to link back to the main table A), the new status, and the date/time when it happened.
What would be the best trigger for an event associated with the Combo box? And what code will enable me to create a new record each time for the table B?
Thanks,
Vaughan
ASKER
Hi Nic,
Best to use the BeforeUpdate event of the form. - OK, got that.
The currentdb.execute is foreign territory to me - where can I find a good introduction to it? I'm OK with VBA, but I don't know the currentdb word.
Thanks,
Vaughan
Best to use the BeforeUpdate event of the form. - OK, got that.
The currentdb.execute is foreign territory to me - where can I find a good introduction to it? I'm OK with VBA, but I don't know the currentdb word.
Thanks,
Vaughan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There you can use:
currentdb.execute ("insert into tblLog (DateTimeUpdate, oldvalue, newvalue) values (Now(),'" & me.status.oldvalue & "','" & me.status & "'")
Getting the idea ?
Nic;o)