I have this parametized query:
and I'm using this code to fill in the parameters:
I'm getting 'Too few parameters expected'. Isn't the code above the proper way of filling in the parameter values? Any help on this would be appreciated.
Thanks,
Rewdee
Code:
PARAMETERS paramSling Short, paramLand Short, paramTSN IEEEDouble paramCraftID Text ( 7 );
INSERT INTO tblLogs ( Sling, Land, ENG_TSN, CraftID )
VALUES ([paramSling], [paramLand], [paramTSN], [paramCraftID]);
Code:
With CurrentDb.QueryDefs("qryResetMaint")
If Me.chbxEngTSN Then
.Parameters("paramTSN").Value = Me.txtEngTSN.Value - Me.txtCurEngTSNTot.Value
Else
.Parameters("paramTSN").Value = 0
End If
If Me.chbxLand Then
.Parameters("paramLand").Value = Me.txtLand.Value - Me.txtCurLandTot.Value
Else
.Parameters("paramLand").Value = 0
End If
If Me.chbxSling Then
.Parameters("paramSling").Value = Me.txtSling.Value - Me.txtCurSlingTot.Value
Else
.Parameters("paramSling").Value = 0
End If
.Parameters("paramCraftID").Value = Me.OpenArgs
.Execute
End With
Thanks,
Rewdee