Results 1 to 4 of 4

Thread: VBA & ACCESS

  1. #1
    Member
    Join Date
    2002-09
    Posts
    10
    Login to Give a bone
    0

    Unhappy VBA & ACCESS

    Hello!


    I have a VBA module which is connecting to an Access database. The module is used on two computers:
    - one with Windows 98, AutoCAD 2000i and Access 2000
    - the other with Windows 2000, AutoCAD 2002 and Access 2000.

    In Reference window in both cases I have:
    - Visual Basic For Application
    - AutoCAD 2000 Type library
    - OLE Automation
    - Microsoft Froms 2.0 Object Library
    - Microsoft Acces 9.0 Object Library
    - MIcrosoft DAO 3.51 Object library

    The code used to connect to database is this:

    Dim WS As Workspace
    Dim DB As Database
    Dim strDatabasePAth as string

    For a few days on computer with Winows 2000 I get the error "ActiveX component can't create object" when I arrive here:

    Set WS = DBEngine.Workspaces(0)
    Set DB = WS.OpenDatabase(strDatabasePath)

    Can you help me, please?
    Thank you!

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,421
    Login to Give a bone
    0

    Default Re: VBA & ACCESS

    Are you trying to open another db, other than the currently open one? I notice that you have acad 2002 on this machine, but reference the 2000 lib. Do they both use the same? I ask since I don't have 02.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Member
    Join Date
    2002-09
    Posts
    10
    Login to Give a bone
    0

    Default Re: VBA & ACCESS

    The VBA module and databases are the same on the two computers.
    A few weeks ago when I used, it worked on Windows2000 computer too, but a few days ago when I tryed again I got that error.

  4. #4
    Member
    Join Date
    2004-05
    Posts
    3
    Login to Give a bone
    0

    Default Re: VBA & ACCESS

    Look at the refferences in your project. See if MSAcces is checked.

Similar Threads

  1. RPC Access
    By vanderloo5 in forum Revit - Platform
    Replies: 2
    Last Post: 2008-12-07, 01:15 AM
  2. quick access - no access
    By CADMama in forum AutoCAD General
    Replies: 5
    Last Post: 2008-09-11, 08:49 PM
  3. VAV box access
    By clarkmorgan in forum Parts Builder
    Replies: 3
    Last Post: 2008-05-09, 06:37 PM
  4. MS Access, SQL and VBa
    By peter in forum VBA/COM Interop
    Replies: 1
    Last Post: 2005-01-29, 05:24 PM
  5. Access vs. SQL
    By bhargis in forum VBA/COM Interop
    Replies: 4
    Last Post: 2004-12-09, 11:08 PM

Posting Permissions

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