cenderawasih
MIS
I need to add certain data from Table A into table B if and only if the data in table A does not exist yet in table B.
The problem is, when i use the DO UNTIL Loop, The 1st data in table B that doesn't match the 1st data in table A is consider as UNMATCH data by the system although if that data already exist in table B but maybe in the next next row after the 1st row......
What i need now for my code to be able to compare for all data in table A with all the data in table B. Then when there is no match (meaning the data exist in table A but does not exist in table B), The copy codes from table A to table B for these UNMATCH data will be executed. This is my code :
Do Until rstFPT1JP00.EOF
If Not rstFPT1JP00.Fields("PTMCU"
= rstTemp.Fields
("tempPTMCU"
Then
rstTemp.AddNew
rstTemp.Fields("tempPTMCU"
= rstFPT1JP00.Fields
("PTMCU"
.Value
rstTemp.Update
End If
rstFPT1JP00.MoveNext
rstTemp.MoveNext
Loop
The problem is, when i use the DO UNTIL Loop, The 1st data in table B that doesn't match the 1st data in table A is consider as UNMATCH data by the system although if that data already exist in table B but maybe in the next next row after the 1st row......
What i need now for my code to be able to compare for all data in table A with all the data in table B. Then when there is no match (meaning the data exist in table A but does not exist in table B), The copy codes from table A to table B for these UNMATCH data will be executed. This is my code :
Do Until rstFPT1JP00.EOF
If Not rstFPT1JP00.Fields("PTMCU"
("tempPTMCU"
rstTemp.AddNew
rstTemp.Fields("tempPTMCU"
("PTMCU"
rstTemp.Update
End If
rstFPT1JP00.MoveNext
rstTemp.MoveNext
Loop