Caculated field question

  • Thread starter Thread starter Sanj
  • Start date Start date
S

Sanj

A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by sum
of hours. Can anyone help me with this??Thanks
 
thanks Ken..In new field, I used the expression below and
in total I used group by which worked fine.But when I ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by sum
of hours. Can anyone help me with this??Thanks


.
 
It's asking because it's not connecting those field names to the other
fields.

Just because the query did run after you clicked OK does not mean that it's
giving you the correct results. Post the SQL statement of the query before
you put in the DivisionValue: /[C] field, and let's see how we can make
it work without asking for the parameters.

--

Ken Snell
<MS ACCESS MVP>

thanks Ken..In new field, I used the expression below and
in total I used group by which worked fine.But when I ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by sum
of hours. Can anyone help me with this??Thanks


.
 
Hello Ken,
Here is a SQL view before the expression--
SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC]
FROM [File]
GROUP BY [File].[A];

Any help in finding out the correct way of calculation
will be appreciated. Thanks
-----Original Message-----
It's asking because it's not connecting those field names to the other
fields.

Just because the query did run after you clicked OK does not mean that it's
giving you the correct results. Post the SQL statement of the query before
you put in the DivisionValue: /[C] field, and let's see how we can make
it work without asking for the parameters.

--

Ken Snell
<MS ACCESS MVP>

thanks Ken..In new field, I used the expression below and
in total I used group by which worked fine.But when I ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by sum
of hours. Can anyone help me with this??Thanks




.



.
 
Ok - let's try this:

SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC], [SumOfB]/[SumOfC] AS Answer
FROM [File]
GROUP BY [File].[A];

--

Ken Snell
<MS ACCESS MVP>


Sanj said:
Hello Ken,
Here is a SQL view before the expression--
SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC]
FROM [File]
GROUP BY [File].[A];

Any help in finding out the correct way of calculation
will be appreciated. Thanks
-----Original Message-----
It's asking because it's not connecting those field names to the other
fields.

Just because the query did run after you clicked OK does not mean that it's
giving you the correct results. Post the SQL statement of the query before
you put in the DivisionValue: /[C] field, and let's see how we can make
it work without asking for the parameters.

--

Ken Snell
<MS ACCESS MVP>

thanks Ken..In new field, I used the expression below and
in total I used group by which worked fine.But when I ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


message
A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by
sum
of hours. Can anyone help me with this??Thanks




.



.
 
Ken, Thank you so much. You saved my day... I appreciate
your help and thank you again..
Sanj
-----Original Message-----
Ok - let's try this:

SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC], [SumOfB]/[SumOfC] AS Answer
FROM [File]
GROUP BY [File].[A];

--

Ken Snell
<MS ACCESS MVP>


Hello Ken,
Here is a SQL view before the expression--
SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC]
FROM [File]
GROUP BY [File].[A];

Any help in finding out the correct way of calculation
will be appreciated. Thanks
-----Original Message-----
It's asking because it's not connecting those field names to the other
fields.

Just because the query did run after you clicked OK
does
not mean that it's
giving you the correct results. Post the SQL statement of the query before
you put in the DivisionValue: /[C] field, and let's see how we can make
it work without asking for the parameters.

--

Ken Snell
<MS ACCESS MVP>

thanks Ken..In new field, I used the expression below and
in total I used group by which worked fine.But when I ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


message
A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by
sum
of hours. Can anyone help me with this??Thanks




.



.



.
 
You're welcome.

--

Ken Snell
<MS ACCESS MVP>

Sanj said:
Ken, Thank you so much. You saved my day... I appreciate
your help and thank you again..
Sanj
-----Original Message-----
Ok - let's try this:

SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC], [SumOfB]/[SumOfC] AS Answer
FROM [File]
GROUP BY [File].[A];

--

Ken Snell
<MS ACCESS MVP>


Hello Ken,
Here is a SQL view before the expression--
SELECT [File].[A], Sum([File].) AS [SumOfB], Sum
([File].[C]) AS [SumOfC]
FROM [File]
GROUP BY [File].[A];

Any help in finding out the correct way of calculation
will be appreciated. Thanks

-----Original Message-----
It's asking because it's not connecting those field
names to the other
fields.

Just because the query did run after you clicked OK does
not mean that it's
giving you the correct results. Post the SQL statement
of the query before
you put in the DivisionValue: /[C] field, and let's
see how we can make
it work without asking for the parameters.

--

Ken Snell
<MS ACCESS MVP>

thanks Ken..In new field, I used the expression below
and
in total I used group by which worked fine.But when I
ran
a query it asked me enter parameter b and c.I just
clicked ok in both and it ran OK. Just curious why it
asked enter parameter even though it is not parameter
query??Thanks
-----Original Message-----
Did you try
DivisionValue: /[C]

--

Ken Snell
<MS ACCESS MVP>


message
A B C
sum of charges sum of hours
Becky
John

I ran a query with Field A Group by name,Field B sum,
field C sum.I need to calculate a rate in calculated
field D that shows rate i.e sum of charges divided by
sum
of hours. Can anyone help me with this??Thanks




.



.



.
 
Back
Top