I am getting this error when I try to run the Dim DAO as DB:
user defined type not defined
I have installed the Microsoft ActiveX Data Objects 2.8 but still getting the error?
Anyone have suggestions?
I am getting this error when I try to run the Dim DAO as DB:
user defined type not defined
I have installed the Microsoft ActiveX Data Objects 2.8 but still getting the error?
Anyone have suggestions?
What exactly are you trying to do?
Dim db as DAO.Database is correct syntax, but you have to make sure you have the DAO library referenced.
trying to access another database to pull in specific form/queries, or export forms/queries from my current db to another db.
You have to do it in code?
You can open the second database, then do the GetExternalData, Import from your original database. Pretty straight forward if you just want to create a new DB.
Last edited by orange; 06-23-2011 at 11:08 AM. Reason: spelling
You do not use DAO as a variable name.
Dim db As DAO.Database
(as shown by orange is correct)
If I use Dim db As DAO.Database I still get the same error. My next ?, is this code required to perform these operations?
1. Yes, it is.
2. You posted that you
I have installed the Microsoft ActiveX Data Objects 2.8 but still getting the error?
But that isn't the right thing. That is ADO not DAO and for DAO you would need to set the reference to
Microsoft DAO 3.6 Object Library
Well, I'll be a monkey's uncle! That fixed it, thanks!