I have been testing my database and have found an issue when using one of my append query. Everytime I run the append query (On Close form event) I am ending up with duplicates but I want the append query to be smart and only append those rows that are not equal in tblRecords.
Example
tblRecords consist of field1, field2, field3, field4, field5 and currently have lets say 5 records as shown below
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 2 Test
Row4 - ZXC 0 Something
Row5 - THC 1 Test
So I am appending information from tblTemp into tblRecords
tblTemp consist of field1, field2, field3, field4 and field5 and currently have lets say 5 records as shown below
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 3 Test
Row4 - ZXC 1 Something
Row5 - THC 1 Test
So the append query should append ONLY row3 and row4 from tblTemp to tblRecord as the other rows are similar. So tblRecord will look like this
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 2 Test
Row4 - ZXC 0 Something
Row5 - THC 1 Test
Row6 - CAB 3 Test
Row7 - ZXC 1 Something
Basically the criteria is if field1, field2 and field3 in tblTemp are in tblRecord then ignore otherwise if anyone is different then append from tblTemp to tblRecord
Is that possible.
Thanks
Example
tblRecords consist of field1, field2, field3, field4, field5 and currently have lets say 5 records as shown below
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 2 Test
Row4 - ZXC 0 Something
Row5 - THC 1 Test
So I am appending information from tblTemp into tblRecords
tblTemp consist of field1, field2, field3, field4 and field5 and currently have lets say 5 records as shown below
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 3 Test
Row4 - ZXC 1 Something
Row5 - THC 1 Test
So the append query should append ONLY row3 and row4 from tblTemp to tblRecord as the other rows are similar. So tblRecord will look like this
field1 field2 field3 field4 field5
Row1 - ABC 3 Test
Row2 - BCA 3 Name
Row3 - CAB 2 Test
Row4 - ZXC 0 Something
Row5 - THC 1 Test
Row6 - CAB 3 Test
Row7 - ZXC 1 Something
Basically the criteria is if field1, field2 and field3 in tblTemp are in tblRecord then ignore otherwise if anyone is different then append from tblTemp to tblRecord
Is that possible.
Thanks