J
Jeff
I have written a small novel in an attempt to explain the
current database situation in order to receive help in
writing code to automatically remove duplicates from two
tables.
Tables:
X: has two fields:ID#,TermDate
Y: has two fields:ID#,EffectiveDate
Z: has four fields:ID#,TermDate,EffectiveDate,LossDate
Table X and Y are combined into Table Z by running a make-
table query (QueryA)that copies all Table X data and adds
15 days to the TermDate to calculate LossDate, then an
append table query (QueryB)copies all data from Table Y
and adds 180 days to EffectiveDate to calculate LossDate.
A find dup query (QueryC)is ran to check for duplicate
ID#'s in Table Z. If any duplicates are found, they need
to be removed from either Table X or Table Y, depending on
which record has the latest date of point loss.
What I need is code to identify the latest date of point
loss from a set of duplicate ID#'s, identify which table
(X or Y) that the record with the latest date of point
loss came from, then delete that record from the
identified table.
current database situation in order to receive help in
writing code to automatically remove duplicates from two
tables.
Tables:
X: has two fields:ID#,TermDate
Y: has two fields:ID#,EffectiveDate
Z: has four fields:ID#,TermDate,EffectiveDate,LossDate
Table X and Y are combined into Table Z by running a make-
table query (QueryA)that copies all Table X data and adds
15 days to the TermDate to calculate LossDate, then an
append table query (QueryB)copies all data from Table Y
and adds 180 days to EffectiveDate to calculate LossDate.
A find dup query (QueryC)is ran to check for duplicate
ID#'s in Table Z. If any duplicates are found, they need
to be removed from either Table X or Table Y, depending on
which record has the latest date of point loss.
What I need is code to identify the latest date of point
loss from a set of duplicate ID#'s, identify which table
(X or Y) that the record with the latest date of point
loss came from, then delete that record from the
identified table.