Smiley1
05-16-02, 22:14
| Re the table comparisons, My code now looks like this ' What the record was MyDb.Execute _ ("select CQ2.* INTO Temp " _ & "From CQ2 Where Not Exists " _ & "(select * from [Contractor Qualified] as CQ where " _ & "((CQ2.Area = CQ.Area) and " _ & "(CQ2.[Trade Type] = CQ.[Trade Type]) and " _ & "(CQ2.[Rate Above Par] = CQ.[Rate Above Par]) and " _ & "(CQ2.[Contractor Id] = CQ.[Contractor Id])))") 'What the record is MyDb.Execute _ ("insert into Temp select [Contractor Qualified].* " _ & "From [Contractor Qualified] Where Not Exists " _ & "(select * from CQ2 where " _ & "((CQ2.Area = [Contractor Qualified].Area) and " _ & "(CQ2.[Trade Type] = [Contractor Qualified].[Trade Type]) and " _ & "(CQ2.[Rate Above Par] = [Contractor Qualified].[Rate Above Par]) and " _ & "(CQ2.[Contractor Id] = [Contractor Qualified].[Contractor Id])))") This shows any changes to the records as well as any new ones added. I need to filter this so that the new records go into a permanent backup table and the changed records go to a transaction changed table. Any suggestions Many Thanks |