By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,127 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

CurrentProject.Connection failure

P: n/a
Hi all.

I'm having a serious problem when i'm trying to use the
CurrentProject.Connection property for some ADO manipulation.

Here's the error message i'm getting:

Run-time error '-2147220999 (800401f9)':
Method 'Connection' of object '_CurrentProject' failed

In the immediate window, i try to execute this statement:

Msgbox CurrentProject.Connection

but again i get a funky error with the same error code as above:

Automation error
Error in the DLL

I got this error working on two different machines, both running
Windows XP.
I'm using MS Access 2002 (10.6501.6626) SP3

Any help will be greatly appreciated.
Alex

Jul 31 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.
Dim cn as ADODB.Connection

Now set cn to your project's connection.

Set cn = CurrentProject.Connection

You would now use cn for whatever you need to do.

Hope that helps!

alex.hatzisavas wrote:
Hi all.

I'm having a serious problem when i'm trying to use the
CurrentProject.Connection property for some ADO manipulation.

Here's the error message i'm getting:

Run-time error '-2147220999 (800401f9)':
Method 'Connection' of object '_CurrentProject' failed

In the immediate window, i try to execute this statement:

Msgbox CurrentProject.Connection

but again i get a funky error with the same error code as above:

Automation error
Error in the DLL

I got this error working on two different machines, both running
Windows XP.
I'm using MS Access 2002 (10.6501.6626) SP3

Any help will be greatly appreciated.
Alex
Jul 31 '06 #2

P: n/a
"Jeff L" <jl*******@hotmail.comwrote in news:1154369718.982525.237050
@p79g2000cwp.googlegroups.com:
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.
No.

--
Lyle Fairfield
Jul 31 '06 #3

P: n/a

Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
Lyle Fairfield wrote:
"Jeff L" <jl*******@hotmail.comwrote in news:1154369718.982525.237050
@p79g2000cwp.googlegroups.com:
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.

No.

--
Lyle Fairfield
Aug 1 '06 #4

P: n/a
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.

Aug 1 '06 #5

P: n/a

Hi Lyle, and thanks very much.
I tried installing MDAC 2.7 RTM (which is the only one that would get
installed on my machine), but it didn't work.
Also tried using alternative statements (codeproject etc.) but no luck.
So i think i'll just reinstall the product and hope to solve this.

Alex
Lyle Fairfield wrote:
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?

I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.
Aug 1 '06 #6

P: n/a

Ok, here's the solution -or, in any case, what worked on my pc- for
this
mysterious bug with CurrentProject.Connection...

Here's the saviour-resource :-)...

http://msauer.mvps.org/images/error.pdf

Steps (1) & (2) are useful for checking MDAC versions and if there are
any
missing files there, but the 'beef' comes with (3) & (4).

For (3), use WinZip to extract the files of the MDAC that corresponds
to
your version of Windows (e.g. MDAC 2.8 SP1) to a temporary folder.

For (4), again use WinZip to extract the files of "mdacxpak" in another

folder.

Then go to folder C:\Windows\inf, find "mdac" (setup information file),

right-click on it and select install as the instructions specify.

During installation, you will probably need to use the Search utility
of
Windows to locate various DLLs (i certainly had to to locate 4-5 DLLs
in
various folders).

In my case the problem was solved once the pc was rebooted.


alex.hatzisavas wrote:
Hi Lyle, and thanks very much.
I tried installing MDAC 2.7 RTM (which is the only one that would get
installed on my machine), but it didn't work.
Also tried using alternative statements (codeproject etc.) but no luck.
So i think i'll just reinstall the product and hope to solve this.

Alex
Lyle Fairfield wrote:
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.
Aug 14 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.