Most Dreaded Error Message

josephyeo

Registered User.
Local time
Today, 13:35
Joined
Dec 10, 2000
Messages
13
I have been programing in VBA for a while. Each time I try to put a copy of a perfectly written program on a different computer, it gives me the message "Microsoft Access can't start the data access object (DAO)". The references usually would not show any Ms DAO.dll file. So I put it in, and it will still not work. Even starting a new database and copying the forms and reports across would not work too. Once I do that, it would not even recognise Northwind. The line of code in question is "set db as database". It does not recognise the word database. Please help.
 
There is a possibility that your references, though valid, are in the wrong order.

Check your references for any DAO files. If they are relatively low in your list of references, you should click (once) on the DAO file and move it up using the priority buttons.

If it is relatively early in the list, you might have another problem. Try qualifying the database.

Dim dbX as DAO.Database
 
Just jumped out at me. In VBA, you don't use SET that way.

Dim dbX as database
...


set dbX = currentdb
 
I emailed your responder Mr. Hunt and he cannot help me as a member of the US Navy they are on minimise mail.

I was viewing your solution the first part worked however I then get a problem in Dim rst As Recordset.

Will this be a cascading error???
 
If I understand your response correctly, then yes, you might have to qualify anything that is in the DAO library. This is almost certain due to something being in the wrong order in you references list.

Make your DAO library higher in priority than anything except VBA libraries and see if that helps. (You do that from the references list screen. Select a reference from the list and use the arrows to raise or lower its order in the references search list.)
 

Users who are viewing this thread

Back
Top Bottom