I have the below code to do matching between two different tables. The code only updates the first record as "Matched".

I want to compare each record in ID field from T1 if it present in T2, e.g. To check if A present in T2 then go to next record in T1 and check B if it present in T2 through loop until all records in T1 matched

Table 1

ID
A
B
C

Table 2

ID
A
B

Expected Matching Results

ID
A
B
Any help please

If rs2("ID").Value = rs1("ID").Value Then
rs2.MoveNext()
Do While Not rs2.EOF()

rs1("Matching").Value = "Matched"
rs1.Update()
rs2.MoveFirst()
Loop

End If