Need VBA advice with compare 2 record set.

  • Thread starter Thread starter TA
  • Start date Start date
T

TA

Hello all experts,
Can someone give me a basic VBA code to compare data
between 2 table and replace like:
If rs1.clientid=rs2.clientid then
replace rs2.sex with rs1.sex
replace rs2.race with rs1.race
...
endif

Best Regards,
TA
 
Use an Update query.

1. Create a query into the 2 tables, so they are joined on something
appropriate such as ClientID.

2. Change it to an Update query (Update on Query menu).

3. In the new Update row, under the Sex field form Table1, enter:
[Table2].[Sex]

4. Run the query to perform the update.

5. Repeat for the Race field.
 
Back
Top