route217
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...
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.OL EDB.4.0;" _
& "Data Source=" & strPath
Debug.Print strPath
cn.Open
End Sub
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
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.OL
& "Data Source=" & strPath
Debug.Print strPath
cn.Open
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Even if it was not, that couldn't generate the error you see.
/gustav
/gustav
ASKER
is the microsoft jet code correct