Results 1 to 2 of 2

Thread: Recordset opens

  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •