multipling

N

Norm

I have a field.. SumOfPHCTC..and I want to multiply this by a value that I
can enter..the value will be different each time ...SumOfPHCTC...changes each
query
 
J

Jerry Whittle

SumOfPHCTC looks like something created by a Totals query. Is this field in a
query or in a table?

If a query, post the SQL statement here.
 
N

Norm

here is the SQL
SELECT Totals.Field1, Totals.PHPRWV, Totals.SumOfPHTUTS, Totals.SumOfPHTCT,
[sumofphtct]*3.25 AS [TOTAL CHARGE CS], [sumofphtuts]*0.41 AS [TOTAL CHARGE
UNITS]
here is the SQL for the next query ,I want to be able to change the
multiplier(3.25 & .41) without going into the query design
GROUP BY Totals.Field1, Totals.PHPRWV, Totals.SumOfPHTUTS,
Totals.SumOfPHTCT, [sumofphtct]*3.25, [sumofphtuts]*0.41;
Thanks
 
J

Jerry Whittle

You need parameters to ask you for input. Your SQL statement didn't make it
all the way, but it would look something similar to this. You will be
prompted for the Enter Charge Multiplier and Enter UNITS Multiplier values.

PARAMETERS [Enter CHARGE Multiplier] IEEEDouble, [Enter UNITS Multiplier]
IEEEDouble;
SELECT [Month]*[Enter CHARGE Multiplier] AS Expr1,
[Year]*[Enter UNITS multiplier] AS Expr2,
Sum(Asa.htn) AS SumOfhtn
FROM Asa
GROUP BY [Month]*[Enter CHARGE Multiplier],
[Year]*[Enter UNITS multiplier];

You really want to specifically define the parameter data type. IEEEDouble
is the same as a Double number which you'd need if you want decimal points.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Norm said:
here is the SQL
SELECT Totals.Field1, Totals.PHPRWV, Totals.SumOfPHTUTS, Totals.SumOfPHTCT,
[sumofphtct]*3.25 AS [TOTAL CHARGE CS], [sumofphtuts]*0.41 AS [TOTAL CHARGE
UNITS]
here is the SQL for the next query ,I want to be able to change the
multiplier(3.25 & .41) without going into the query design
GROUP BY Totals.Field1, Totals.PHPRWV, Totals.SumOfPHTUTS,
Totals.SumOfPHTCT, [sumofphtct]*3.25, [sumofphtuts]*0.41;
Thanks


Jerry Whittle said:
SumOfPHCTC looks like something created by a Totals query. Is this field in a
query or in a table?

If a query, post the SQL statement here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top