Link to home
Start Free TrialLog in
Avatar of route217
route217Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Run time error 2147217904 (80040e10)

Hi Experts

I am getting the following error when trying to connect my fron end ms excel worksheet to the ms access database via sql statement

error message: No value given for one or more required parameters..

Vba code...

Import_Data.Open strSQl, cn, adOpenStatic, adLockOptimistic

Open in new window


cannot see the wood for the trees...

Also the microsoft jet engine is (which could be the cause of the problem on system 32...version 4.0.9511.0)

Public Sub ConnectDB(cn As ADODB.Connection, strDatabase As String)
Dim strPath As String

strPath = ActiveWorkbook.Path & "\Databases\" & strDatabase & ".mdb"

Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
                              & "Data Source=" & strPath
                             
                              Debug.Print strPath
cn.Open
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of route217

ASKER

thanks for the feedback...

is the microsoft jet code correct
Even if it was not, that couldn't generate the error you see.

/gustav