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

    Opening a database (2000)

    I want to open a database from within Excel and use the DoCmd object to import my Excel data into a table. I've created an object variable to refer to Access, used CreateObject to open access and then used the OpenDatabase method to open the specific database I need.. but then the DoCmd object says that it 'requires an open database'??! Isn't the database already open? Andy.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Opening a database (2000)

    You should use OpenCurrentDatabase instead of OpenDatabase.

    OpenDatabase is a DAO method that opens a database as a DAO object. OpenCurrentDatabase is the equivalent of File/Open..., it opens a database in the Access application.

Posting Permissions

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