In the function below i get the error ” too few parameters.Can you help me ?
Public Function Dummy()
Dim StrSQL As String
Dim Surcharge As String
Surcharge = ” (IIf([Size]=1,0.138,IIf([Size]=0.4,0.138,IIf([Size]=0.5,0.138,IIf([Size]=4,0.552,IIf([Size]=10,0.552,IIf([Size]=5,0.552,IIf([Size]=18,2.48,IIf(=20,2.66,IIf(=60,6.27,IIf(=180,6.18,IIf(=205,19,IIf(=210,19,0))))))))))))/IIf(<5,1,))"
StrSQL = " UPDATE products SET products.DDU = [exworks] + freight + Surcharge"
CurrentDb.Execute StrSQL
End Function
exwroks is a field in the table and freight is a constant : Public Const freight As Double = 0.3