• Runtime error 13 (Access 2000)

    Author
    Topic
    #366170

    I’ve only recently upgraded this box from Access 97 to 2000, and it has caused many more problems than it has solved. Most are solved by setting references, but so far I can’t find the solution. I execute this code:

    dim db as database
    dim rst as recordset
    set db = currentdb
    set rst = db.openrecordset(“Donors”, dbOpenDynaset)

    I’ve done this so many times in ’97 I can’t count them, but this time it bombs with “Run time error ’13′”, type mismatch.

    What the @#!? does this mean? Am I missing a reference? Here are the references I have:

    Visual Basic for Applications
    Microsoft Access 9.0 Object Library
    OLE Automation
    Microsoft ActiveX Data Objects 2.1 Library
    Microsoft DAO 3.6 Object Library
    Microsoft Visual Basic for Application Extensibility 5.3

    Ideas?

    Viewing 0 reply threads
    Author
    Replies
    • #567039

      The fact that you have MS ActiveX Data Objects 2.1 Lib before MS DAO 3.6 Object Lib is causing VBA to assume that you want to use ADO, which isn’t what you are trying to do. Access 2K defaults to ADO, which is why the reference shows up to begin with in 2000 databases. Either delete the reference, or move it to the bottom of the list, and your problem should disappear. The former assumes you don’t want to use ADO, and if you are simply converting a Access97 app, I would simply drop it. If you use the option of moving it, I would explicity declare the data access method. See the A2K help, or search this forum for “references” and you should see examples of how to declare your method. Your post doesn’t indicate whether you have the service pack – I would run, not walk, to the MS web site and download it if you don’t already have it. Good luck.

    Viewing 0 reply threads
    Reply To: Runtime error 13 (Access 2000)

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

    Your information: