K
Know39
The following is SQL code from a function that works fine in our
current database. After changing the data source to a new database
suddenly it throws the 3061 error.
The error occurs whether the Original line or the Test line was used.
I checked all spellings and are correct. The [Member Medical] is a
query.
Function getPlnCovDesc(EID As String)
Dim mEmplClassCode As String
Dim mBenPlan As String
Dim rst As DAO.Recordset
Dim mSQL As String
'ORIGINAL LINE:
mSQL = "Select * from [Member Medical] where EMPL_ID = '" & EID & "'"
'TEST LINE:
'mSQL = "Select EMPL_CLASS_CD, BEN_PLAN_CD from [Member Medical] where
EMPL_ID='096553'"
Set rst = db.OpenRecordset(mSQL) <-- 3061 Error. Too Few
Parameters. Expected 2.
current database. After changing the data source to a new database
suddenly it throws the 3061 error.
The error occurs whether the Original line or the Test line was used.
I checked all spellings and are correct. The [Member Medical] is a
query.
Function getPlnCovDesc(EID As String)
Dim mEmplClassCode As String
Dim mBenPlan As String
Dim rst As DAO.Recordset
Dim mSQL As String
'ORIGINAL LINE:
mSQL = "Select * from [Member Medical] where EMPL_ID = '" & EID & "'"
'TEST LINE:
'mSQL = "Select EMPL_CLASS_CD, BEN_PLAN_CD from [Member Medical] where
EMPL_ID='096553'"
Set rst = db.OpenRecordset(mSQL) <-- 3061 Error. Too Few
Parameters. Expected 2.