Data History

X

Xero_inc

I have a table CurrentName with ID(Autonumber + primaryKey), Name as the two
fields. My form displays Name for data entry and modifications. I would like
to track the changes to Name field in a separate table (HISTORY) whose format
is as below -The relationship between CurrentName and History table is 1 to
many.

ID
Name
EffectiveDate
EndDate

If it is a new record - EffectiveDate is currentdate & EndDate is NULL.
If it is modification to existing record - then it
Step 1: first updates the existing record where EndDate is null to
currentDate
Step 2: inserts new record with ID, Name (updated), EffectiveDate
(CurrentDate), EndDate(NULL)

Please reply only if you could provide some code snippets?
 
Top