Error: Invalid access to memory location

  • Thread starter Thread starter Hallgeir
  • Start date Start date
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?
 
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
 
Back
Top