Error: Invalid access to memory location

H

Hallgeir

I have this code:
Dim conn As adodb.Connection
Set conn = CurrentProject.Connection

This works fine everywhere except on one computer. I get an error message
saying:
Runtime error '-2147023898(800703e6)':
Invalid access to memory.

And the debugger stops at the line "Set conn = CurrentProject.Connection"

Do anyone have any suggestion on why this line gives error on only one
computer (win xp). Could it be a problem with user rights?
 
R

RoyVidar

Hallgeir said:
I have this code:
Dim conn As adodb.Connection
Set conn = CurrentProject.Connection

This works fine everywhere except on one computer. I get an error message
saying:
Runtime error '-2147023898(800703e6)':
Invalid access to memory.

And the debugger stops at the line "Set conn = CurrentProject.Connection"

Do anyone have any suggestion on why this line gives error on only one
computer (win xp). Could it be a problem with user rights?

I don't know, but I'm thinking this has to do with either part of Access
is corrupt (Application.CurrentProject.Connection), which I don't think
is likely, or there's something wrong with the ADO library on that
computer.

If the computer can do a
? currentproject.connection
from the immediate pane, and give a valid connection string, then it's
probably something wrong with the ADO library.

Try downloading and installing the latest MDAC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top