Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126

    Unanswered: 97 to XP Conversion Error 13 affecting functionality

    Hello,
    I've almost successfully converted 97 Access to XP. Almost all the functionality is there only on one form when I try to add a product to the list it throws Set MySet = MyDB.OpenRecordset("SELECT [Code] FROM tblFormulaNames WHERE [Code] = '" & NewData & "'")

    Earlier Dim MySet As Recordset

    I think this is my problem, any help is truly appreciated. This db uses linking and autoexec modules home written. I get error 13 THANK YOU
    Last edited by vojtab; 12-22-03 at 12:29.

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    When viewing the code from the Microsoft Visual basic window, check your DLL references. Go to the menu item Tools/ References. I'm guessing that you used to have "Miscrosoft DAO 3.6 Object Library" checked but now it has defaulted to something like "Miscrosoft ActiveX Data Objects 2.6 Library". Note, you cannot change the reference when the code is running.

    After changing the reference, then goto the menu item Debug, and choose compile. This will indicate whether the library reference was the problem.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  3. #3
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126
    Thank you for your time. It didn't quite help. I'm still getting an error elsewhere in the db "13 - Type mismatch" or simply "Type mismatch". I did use the conversion tool, now I even tried the recompiling. Didn't seem to help...

  4. #4
    Join Date
    Dec 2003
    Posts
    172
    There is a gotcha when moving from Office 97 - > Office 2k and beyond.

    Change this:
    Dim MyDB As Database
    Dim MyRS As Recordset

    To this:
    Dim MyDB As DAO.Database
    Dim MyRS As DAO.Recordset

    See if that fixes it. You need to reference the DAO object explicitly or it often fails.

    Joe G

  5. #5
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    JoeG recommended explicitly referencing the DAO library.
    Dim MyDB As DAO.Database
    Dim MyRS As DAO.Recordset
    This is necessary if you are referencing both ADO and DAO libraries, and in general is a good idea.

    Regarding the type mismatch error, what are the specifics? When/where do you get the error? Does it appear when you compile or run? What is the line of code that the debugger stops on?

    Debugging tip: if you have a complex SQL statement, try introducing one field or variable at a time. This may help you see which field is incorrect.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  6. #6
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126
    THANK YOU all for help. It was the silliest thing. It was about prioritizing of references. In my case I had to make sure that MS DAO 3.6 has higher priority than ADO 2.1. Having ADO first threw the mismatch error. Thank you!

Posting Permissions

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