G
graeme34 via AccessMonster.com
Hi
If this is a stupid question you'll have to forgive me, still a Learner!
Is it possible to get VBA constant values into a report?
Or do I have to do the calculations in code first. I have an Invoice report
that has a subreport (details). The control source for the subreport is the
following query:
SELECT tblDespatchLine.[Despatch Number], tblDespatchLine.[Quantity Sent],
tblSalesOrderLine.[Product Code], tblProduct.Description, tblSalesOrderLine.
Price, [Quantity Sent]*[Price] AS [Line Total], tblSalesOrderLine.VATRate
FROM tblProduct INNER JOIN (tblDespatchLine INNER JOIN tblSalesOrderLine ON
tblDespatchLine.[Product Code]=tblSalesOrderLine.[Product Code]) ON
(tblDespatchLine.[Product Code]=tblProduct.[Product Code]) AND (tblProduct.
[Product Code]=tblSalesOrderLine.[Product Code]);
Where VATRate is a Value either A, B or C.
I then have VBA constants in my declarations:
Public Const conVATA = 0.175
Public Const conVATB = 0.08
Public Const conVATC = 0
I dont suppose theres a way of getting the constants into the report??
Thank you in advance
Graeme.
If this is a stupid question you'll have to forgive me, still a Learner!
Is it possible to get VBA constant values into a report?
Or do I have to do the calculations in code first. I have an Invoice report
that has a subreport (details). The control source for the subreport is the
following query:
SELECT tblDespatchLine.[Despatch Number], tblDespatchLine.[Quantity Sent],
tblSalesOrderLine.[Product Code], tblProduct.Description, tblSalesOrderLine.
Price, [Quantity Sent]*[Price] AS [Line Total], tblSalesOrderLine.VATRate
FROM tblProduct INNER JOIN (tblDespatchLine INNER JOIN tblSalesOrderLine ON
tblDespatchLine.[Product Code]=tblSalesOrderLine.[Product Code]) ON
(tblDespatchLine.[Product Code]=tblProduct.[Product Code]) AND (tblProduct.
[Product Code]=tblSalesOrderLine.[Product Code]);
Where VATRate is a Value either A, B or C.
I then have VBA constants in my declarations:
Public Const conVATA = 0.175
Public Const conVATB = 0.08
Public Const conVATC = 0
I dont suppose theres a way of getting the constants into the report??
Thank you in advance
Graeme.