G
Guest
The issue I’m having is that I’d like to keep a history of the data fields in
one of my tables.
I have two tables set up as tblinfo and tblhistory. The primary key in
tblinfo is a facility ID which is not duplicated. I have a dual primary key
in the second table with facility ID and date (both individually will be
duplicated but not together in the same record) (I also tried auto number and
a few other combinations to get this to work also). I have a form set up to
query both tables (linked by facility ID) to bring up past information for
editing. What I need is that if the field - “date†(found in tblhistory)
changes I want to be able to force the second table (tblhistory) to save the
information as a new record instead of overwriting what is already there.
The data contained in the first table (tblinfo) will change on occasion but
will not need to be tracked. The data contained in the second table
(tblhistory) I do need to track. Both tables contain a large number of
fields that is why it is imperative that when I open the records the most
recent information form the past opens (instead of having to input all the
fields each time).
Is there a way with afterupdate – for the date field to force a new record
only in tblhistory if the date changes?
Do I need to link the tables in the query different?
Do the primary key(s) in tblhistory need to be different?
Do I need to go about this a whole new way?
I’ve been trying to figure this out for awhile any help would be
appreciated. Thanks.
one of my tables.
I have two tables set up as tblinfo and tblhistory. The primary key in
tblinfo is a facility ID which is not duplicated. I have a dual primary key
in the second table with facility ID and date (both individually will be
duplicated but not together in the same record) (I also tried auto number and
a few other combinations to get this to work also). I have a form set up to
query both tables (linked by facility ID) to bring up past information for
editing. What I need is that if the field - “date†(found in tblhistory)
changes I want to be able to force the second table (tblhistory) to save the
information as a new record instead of overwriting what is already there.
The data contained in the first table (tblinfo) will change on occasion but
will not need to be tracked. The data contained in the second table
(tblhistory) I do need to track. Both tables contain a large number of
fields that is why it is imperative that when I open the records the most
recent information form the past opens (instead of having to input all the
fields each time).
Is there a way with afterupdate – for the date field to force a new record
only in tblhistory if the date changes?
Do I need to link the tables in the query different?
Do the primary key(s) in tblhistory need to be different?
Do I need to go about this a whole new way?
I’ve been trying to figure this out for awhile any help would be
appreciated. Thanks.