#1
|
|||
|
|||
I have code like the following in a Word UserForm (Initialize event):
Code:
Dim db As DAO.Database ' Other code that doesn't matter for now Set db = _ OpenDatabase("\\ServerName\FolderName\DatabaseName.mdb" The problem, though, is with the Set db line. It worked in Office 2016, and Office 2010 before that. However, in Office 365 the Set db line causes Error 429 (ActiveX component can't create object). I have tried to sort out if it is a references problem, but no luck so far. Any ideas? I will be away until Tuesday, Oct. 9. If anybody replies before then, thank you. Please do not think me rude if I do not acknowledge your reply until Tuesday. Sorry, I just realized the message notes the old OS and Office versions. It is now Windows 10, and Office 365 (replacing Office 2016 today). Most of my work is with Access, and I don't get over here very often, so I'm a bit out of step. |
#2
|
|||
|
|||
Update: Solved. I would have deleted the question, but don't see a way to do that, nor can I edit the previous postings. I would mark this as solved if I could find out how to do that.
I removed the reference to DAO 3.6 Object Library, set a reference to Microsoft Office 16.0 Access Database Engine Object Library, and changed the code as follows: Dim db As DAO.Database Dim rs As DAO.Recordset to: Dim db As Object Dim rs As Object Thanks to Albert Kallal in another forum (found via a search) for this suggestion. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I have an error opening an office file please help !!! | a.kaan | Office | 5 | 02-08-2016 02:09 PM |
Restoring the Database of Access | jonker | Misc | 1 | 06-08-2015 11:15 PM |
Put Word forms into an Access database | Aprilhm14 | Word VBA | 1 | 11-06-2014 10:45 PM |
get value from access database in normal line | alysolyman | Word VBA | 0 | 02-16-2013 12:41 PM |
get access database path in Word vba | marooned | Word VBA | 2 | 07-04-2012 06:37 AM |