• Recordset opens

    Author
    Topic
    #459787

    Hello all;

    I have the following VB code: (partial)

    Set db = CurrentDb

    Set rstLegacy = db.OpenRecordset(“tblEXPEMPLOADCSV”)
    Set rstLawson = db.OpenRecordset(“tblLAWEMPLOADCSV”)
    Set rstDifferences = db.OpenRecordset(“tblDifferences”)

    EmpNo = 0
    EmpNoLaw = 0

    ‘Read first record from Legacy

    rstLegacy.MoveFirst
    Debug.Print rstLegacy!empemployee

    ‘Read first record from Lawson

    rstLawson.MoveFirst
    Debug.Print rstLawson!emp_employee

    I’m trying to read rstlegacy and rstlawson and compare the field values.

    What happens is that rstlegacy.movefirst will print employee number 100004 as the first record, which is correct; rstlawson.movefirst will print employee number 100167 as the first record, which is incorrect. It is actually 100004. Both are the same. What am I doing wrong?

    Viewing 0 reply threads
    Author
    Replies
    • #1160212

      Hello again,

      I think I may have stumbled onto a resolution for this. Instead of using tables as my input recordsets, I made queries and used them. Seems to have solved this problem.

    Viewing 0 reply threads
    Reply To: Recordset opens

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: