Consulting

Results 1 to 7 of 7

Thread: Trying to open an Acess Database from Word VBA code fails

  1. #1

    Trying to open an Acess Database from Word VBA code fails

    I am running Windows 10 and a Word VBA application in Word 2016/64-bit.


    Following code line results in error message: "ActiveX component can't create object or return reference to this object (Error 429)"


    Set dbsData = OpenDatabase(strPath & "Database\Lotta 2000.mdb")

    What's the problem?


  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    We'd need to know a lot more about your code before specific advice could be given. One fairly obvious question is whether whatever you're populating strPath with terminates in a '\' - assuming 'Database' is a folder in its own right.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    My application has worked OK for many years, but suddenly I got this problem. Among the references there is a "Microsoft DAO 3.6", located in "C:\Program (x86)\Common Files\Microsoft Shared\DAO\dao360.dll"
    So, from my point of view everything seems to be OK!?

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Did you try re-starting your system? Have you tried repairing the Office installation (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  5. #5
    Quote Originally Posted by macropod View Post
    Did you try re-starting your system? Have you tried repairing the Office installation (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?

    Have done both, buit still the same problem!

  6. #6
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    You haven't answered the question posed in my first post...

    Furthermore, you say you're using Word 2016/64-bit, but I doubt that would use libraries in C:\Programs (x86)\, since anything there is a 32-bit library.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  7. #7
    Well, my strPath ends with "\" and Database is a folder containing the Access Database.

    I also have another path to DAO 3.6: "C:\Programs\..." containing the same dll file, but the references inm the VBA editor points to "C:\Programs (x86)\..."

Posting Permissions

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