If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
multipling
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 |
#2
|
|||
|
|||
multipling
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. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Norm" wrote: 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 |
#3
|
|||
|
|||
multipling
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" wrote: 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. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Norm" wrote: 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 |
#4
|
|||
|
|||
multipling
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" wrote: 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" wrote: 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. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Norm" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|