Method 'OPEN' error on some PCs

A

alpder

I inherited some programs written by a previous employee. We hav
recently upgraded all our PCs from NT4 to XP SP2 and have upgrade
Office97 to Office2003. The code connects an Excel spreadsheet to a
Access database and extracts data from the mdb file
This program works perfectly on some PCs but not others.
Can anyone tell me where to start looking?

Dim DB As ADODB.Connection
Set DB = New ADODB.Connection
Dim RS As ADODB.Recordset
Sheets("Calculation").Activate
sFile = "P:\datareg.mdb"
DB.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & sFile

The error I get is:
"Run-time error '3706': Provider cannot be found. It may not b
properly installed."

I checked the VB references, and the ones checked on both the computer
that can and cannot run the application have the following:

Visual Basic for Applications
Microsoft Excel 11.0 Onject library
Microsoft Forms 2.0 Object library
Microsoft ActiveX Data Objects 2.0 Library

I would be very grateful for any assistance
 
J

John F. Collins

I don't know what ADODB is, but I had similar troubles with ODBC set up.
The driver names had to match exactly as used in the calling program. I
needed to add duplicate drivers with names like

Microsoft Access
MS Access
MSAccess
Microsoft Access Driver

all using the same actual driver, just named differently.

Don't know if that helps.

John
 

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