I am trying to pass a parameter to a query used in a report for a calculation, not a where
string. I am doing this programmatically.
The where
clause works fine but the parameter value does not get passed and the query asks for it.
In the report itself under the properties section for
Recordsource QryrptTaxiInvoice
Filter [TaxiInvID] = 859, [HSTFactor] = .8
I have my parameter declared in the query.
But every time I launch the report is still asks for the parameter value.
Below is some of my code.
strReport = "rptTaxiInvoice"
strWhere = "[TaxiInvID] = " & Me.cboTaxiInvoices
DoCmd.OpenReport strReport,acViewPreview,,strWhere, acWindowNormal, "[ParamHSTFactor]=" & HSTFactor
Here is the query used in the report:
PARAMETERS HSTFactor Double;
SELECT [faceamount]*HSTFactor AS facenetofGST
FROM tblTaxiCos
WHERE tblTaxiCos.prov)="ON"