Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Dec 2001
    Thanked 0 Times in 0 Posts

    Runtime error 13 (Access 2000)

    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


  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Evergreen, CO, USA
    Thanked 58 Times in 58 Posts

    Re: Runtime error 13 (Access 2000)

    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.

Posting Permissions

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