MS Access 2007 - Compile errorduring running : set db = curentdb()

odrap

Registered User.
Local time
Today, 07:27
Joined
Dec 16, 2008
Messages
156
On my computer, running windows 7 Ultimate with Ms office 2010 Professional i have MS Access 2007 as well as MS Access 2010.
When i run my Ms Access database with MS Access 2010, everything get fine.
Testing the same program with MS Access 2007 gives me a compile error:
Error during loading dll.
I suspect some small Photo programs utilties i installed a week ago and deleted afterwards, as the reason for this malfunction. Futher investigation learned me that the error has to do with the reference to the dao.dll.
In the reference window this dll is referenced.
When i try running the following command to unregister the dll in order to register it again:
regsvr -u c:\Program Files\Microsoft Office\Office 12\acedao.dll
I get the message:
Module : c:\Program Files\Microsoft Office\Office 12\acedao.dll is loaded. but the accesspoint DLLUnregisterServer is not found.
What can I do to solve this problem. Is a delleting of the program MS Access 2007 and after that a reinstalling of the program a solution. And i how far can MS Access 2007 be installed after installing ms Access 2010.
Take care that the dll is correct ...
 
1. You shouldn't need to re-register it.

2. What line does it hit when it gives you a compile error (using DEBUG > COMPILE)?
 
Set db = Currentdb()
 
In the sub in question i have :

Private Sub CmdVervangBtw_Click()
On Error GoTo ErrorHandler
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim waarde As Integer

Set db = CurrentDb()
...
 
By the by

I deleted MS Access 2007 and after a shut down of the computer i reinstalled MS Access 2007. However the problem remains !!!
 
And you have the Access Database Engine Object Library checked in your references and NOT DAO 3.x? If not you should.
 
In the reference window both:
Microsoft Access 12.0 object library as well as
Microsoft Office 12.0 Access database engine are referenced
 

Users who are viewing this thread

Back
Top Bottom