S
Stapes
Hi
I have set up an update query with 4 parameters using CreateQueryDef:
"qryUpdSalesMandate".
When I try an run it using the following code: -
Dim db As Database, qd As QueryDef, rs As Recordset
Set db = CurrentDb
Set qd = db.QueryDefs("qryUpdSalesMandate")
qd.Parameters("pCO").Value = Forms!FRM_Frontoffice4_T7_Selling!
T7_Contracting_Company
qd.Parameters("pSPOT").Value = mySpotMandate
qd.Parameters("pFWD").Value = myForwardMandate
qd.Parameters("pREMAIN").Value = myRemainingMandate
Set rs = qd.OpenRecordset
I get the error 3219 Invalid Operation.
I have tried running the query on its own and feeding it the same
parameters, and it worked.
Any ideas?
Stapes
I have set up an update query with 4 parameters using CreateQueryDef:
"qryUpdSalesMandate".
When I try an run it using the following code: -
Dim db As Database, qd As QueryDef, rs As Recordset
Set db = CurrentDb
Set qd = db.QueryDefs("qryUpdSalesMandate")
qd.Parameters("pCO").Value = Forms!FRM_Frontoffice4_T7_Selling!
T7_Contracting_Company
qd.Parameters("pSPOT").Value = mySpotMandate
qd.Parameters("pFWD").Value = myForwardMandate
qd.Parameters("pREMAIN").Value = myRemainingMandate
Set rs = qd.OpenRecordset
I get the error 3219 Invalid Operation.
I have tried running the query on its own and feeding it the same
parameters, and it worked.
Any ideas?
Stapes