A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multipling



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2009, 03:26 AM posted to microsoft.public.access.queries
Norm
external usenet poster
 
Posts: 149
Default 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  
Old December 21st, 2009, 01:38 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default 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  
Old December 21st, 2009, 03:31 PM posted to microsoft.public.access.queries
Norm
external usenet poster
 
Posts: 149
Default 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  
Old December 21st, 2009, 04:15 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.