Hi, I have MSAccess as my front end and SQL server as back end. From the front end MSAccess VBA code, I want to compare records from one table A with records from another table B and update/insert records in table A, if any differences are observed. The
entire VBA code for this is present in front end. Both the tables are in SQL server itself. For comparing each record, I am using the following logic:
Dim db As DAO.Database
Dim dbDst As DAO.Database
Dim rsSrc As DAO.Recordset
Dim rsDst As DAO.Recordset
Dim l_Emp_id As Long
Set db = CurrentDb
Set dbDst = CurrentDb
Set rsSrc = db.OpenRecordset("Source_Table_name", dbOpenForwardOnly)
Do Until rsSrc.EOF
DoEvents
l_Emp_id= rsSrc!Emp_id
Set rsDst = dbDst.OpenRe ...
Go to the complete details ...