Total from a subform

G

Gerald

Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for the
subform for each record. I create a line total with no problems but when I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
R

Rodger

Gerald,

I have to assume you are using this on a continous form. You want to place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger
 
G

Gerald

Unforutanely I am not using a running for I am using a datasheet view within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that field I
get same reult
Thanks
Rodger said:
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Gerald said:
Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for
the
subform for each record. I create a line total with no problems but when I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
R

Rodger

Is there a reason you are using a datasheet view and not a form view?

Gerald said:
Unforutanely I am not using a running for I am using a datasheet view within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that field I
get same reult
Thanks
Rodger said:
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Gerald said:
Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for
the
subform for each record. I create a line total with no problems but
when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
K

KM Davison

You do not have to change your subform from a datasheet, but can put the
total on the main form.

Create the calculated field in the form footer of the subform like Rodger
said. Ensure to name the control a name you will remember such as total

then create a text box on the main form and reference the calculated control
on the subform, ensuring the name of the new control is unique. So if the
Calculated control on the subform is Total and the subform is called
frmOrders the control on the main form would be =[frmOrders]![total] if you
use expression builder it will add Forms! befor the form name, get rid of
this or you will get #Name error

Good Luck

Katherine Davison
www.KatherineDavison.co.uk
Training Consultant

Rodger said:
Is there a reason you are using a datasheet view and not a form view?

Gerald said:
Unforutanely I am not using a running for I am using a datasheet view within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that field I
get same reult
Thanks
Rodger said:
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for
the
subform for each record. I create a line total with no problems but when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
G

Gerald

Not really jsu tworking on the easiest way to complete the end mission but a
from view in continuous mode would get same net reults with a little lay out
work
Rodger said:
Is there a reason you are using a datasheet view and not a form view?

Gerald said:
Unforutanely I am not using a running for I am using a datasheet view within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that field
I
get same reult
Thanks
Rodger said:
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for
the
subform for each record. I create a line total with no problems but when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
G

Gerald

Ok When I do this I get the total for one line but not a total for then
entire sub form pet product.

Let me illustrate what I am doing

I have user input number of atomic ingrediants needed for said component.
Then select the desired number atmoics he needs the prices have been put in
and so through a query pulls the cost of items out. Each ingrediant lists
the cost per unit a they are putting information in and then I calculate the
total of (Num Needed)*(CPU) There is a twist though the CPU is brought to a
basic format so to convert displayed cost to usable format the formula is
this
=(([CST_PUP]*10000000)+([CST_PUG]*10000)+([CST_PUS]*100)+[CST_PUC])*[NUM_ND]

The results then give me a value that is in base amounts all I need is a way
to sum the base amounts that is claculated on a per line event with the
above formula and as the entries are don for the products a running total is
displayed so if line 1 is 100 and line 2 is 330000 and line 3 is 10000 I end
up with a total of 340100 that I can reverse the formula and display the
amounts they are fmailiar with.

And yes there is a reason I need to convert unfortuantely so if that helps

KM Davison said:
You do not have to change your subform from a datasheet, but can put the
total on the main form.

Create the calculated field in the form footer of the subform like Rodger
said. Ensure to name the control a name you will remember such as total

then create a text box on the main form and reference the calculated
control
on the subform, ensuring the name of the new control is unique. So if the
Calculated control on the subform is Total and the subform is called
frmOrders the control on the main form would be =[frmOrders]![total] if
you
use expression builder it will add Forms! befor the form name, get rid of
this or you will get #Name error

Good Luck

Katherine Davison
www.KatherineDavison.co.uk
Training Consultant

Rodger said:
Is there a reason you are using a datasheet view and not a form view?

Gerald said:
Unforutanely I am not using a running for I am using a datasheet view within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that
field I
get same reult
Thanks
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total
for
the
subform for each record. I create a line total with no problems but when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
K

KM Davison

This should still work,

Make sure that the calc on the subform is on the Form footer
if it is still only working for one line, you need to throw a Sum() around
your entire calculation (ie
=sum(([CST_PUP]*10000000)+([CST_PUG]*10000)+([CST_PUS]+ [CST_PUC]) *[num_ND])
.. Never base a calculation on a calculation, Access will occasional do it,
but most of the time it will error.

Katherine

Gerald said:
Ok When I do this I get the total for one line but not a total for then
entire sub form pet product.

Let me illustrate what I am doing

I have user input number of atomic ingrediants needed for said component.
Then select the desired number atmoics he needs the prices have been put in
and so through a query pulls the cost of items out. Each ingrediant lists
the cost per unit a they are putting information in and then I calculate the
total of (Num Needed)*(CPU) There is a twist though the CPU is brought to a
basic format so to convert displayed cost to usable format the formula is
this
=(([CST_PUP]*10000000)+([CST_PUG]*10000)+([CST_PUS]*100)+[CST_PUC])*[NUM_ND]

The results then give me a value that is in base amounts all I need is a way
to sum the base amounts that is claculated on a per line event with the
above formula and as the entries are don for the products a running total is
displayed so if line 1 is 100 and line 2 is 330000 and line 3 is 10000 I end
up with a total of 340100 that I can reverse the formula and display the
amounts they are fmailiar with.

And yes there is a reason I need to convert unfortuantely so if that helps

KM Davison said:
You do not have to change your subform from a datasheet, but can put the
total on the main form.

Create the calculated field in the form footer of the subform like Rodger
said. Ensure to name the control a name you will remember such as total

then create a text box on the main form and reference the calculated
control
on the subform, ensuring the name of the new control is unique. So if the
Calculated control on the subform is Total and the subform is called
frmOrders the control on the main form would be =[frmOrders]![total] if
you
use expression builder it will add Forms! befor the form name, get rid of
this or you will get #Name error

Good Luck

Katherine Davison
www.KatherineDavison.co.uk
Training Consultant

Rodger said:
Is there a reason you are using a datasheet view and not a form view?

Unforutanely I am not using a running for I am using a datasheet view
within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that
field I
get same reult
Thanks
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total
for
the
subform for each record. I create a line total with no problems but
when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is
greatly
appreciated.

Gerald
 
G

Gerald

Thank you that was the problem once I added the sum function to the formula
it works.

Thanks for helping me through the nightmare now I can go and finish this
thing

Gerald
KM Davison said:
This should still work,

Make sure that the calc on the subform is on the Form footer
if it is still only working for one line, you need to throw a Sum() around
your entire calculation (ie
=sum(([CST_PUP]*10000000)+([CST_PUG]*10000)+([CST_PUS]+ [CST_PUC])
*[num_ND])
. Never base a calculation on a calculation, Access will occasional do
it,
but most of the time it will error.

Katherine

Gerald said:
Ok When I do this I get the total for one line but not a total for then
entire sub form pet product.

Let me illustrate what I am doing

I have user input number of atomic ingrediants needed for said component.
Then select the desired number atmoics he needs the prices have been put
in
and so through a query pulls the cost of items out. Each ingrediant
lists
the cost per unit a they are putting information in and then I calculate
the
total of (Num Needed)*(CPU) There is a twist though the CPU is brought
to a
basic format so to convert displayed cost to usable format the formula is
this
=(([CST_PUP]*10000000)+([CST_PUG]*10000)+([CST_PUS]*100)+[CST_PUC])*[NUM_ND]

The results then give me a value that is in base amounts all I need is a
way
to sum the base amounts that is claculated on a per line event with the
above formula and as the entries are don for the products a running total
is
displayed so if line 1 is 100 and line 2 is 330000 and line 3 is 10000 I
end
up with a total of 340100 that I can reverse the formula and display the
amounts they are fmailiar with.

And yes there is a reason I need to convert unfortuantely so if that
helps

KM Davison said:
You do not have to change your subform from a datasheet, but can put
the
total on the main form.

Create the calculated field in the form footer of the subform like
Rodger
said. Ensure to name the control a name you will remember such as
total

then create a text box on the main form and reference the calculated
control
on the subform, ensuring the name of the new control is unique. So if
the
Calculated control on the subform is Total and the subform is called
frmOrders the control on the main form would be =[frmOrders]![total] if
you
use expression builder it will add Forms! befor the form name, get rid
of
this or you will get #Name error

Good Luck

Katherine Davison
www.KatherineDavison.co.uk
Training Consultant

:

Is there a reason you are using a datasheet view and not a form view?

Unforutanely I am not using a running for I am using a datasheet
view
within
the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that
field I
get same reult
Thanks
Gerald,

I have to assume you are using this on a continous form. You want
to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Hello all I guess this will be an easy question but has me
stumped.

I am trying to get a display that will calculate the running
total
for
the
subform for each record. I create a line total with no problems
but
when
I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is
greatly
appreciated.

Gerald
 
J

Jan Kowalski

U¿ytkownik "Gerald said:
Unforutanely I am not using a running for I am using a datasheet view
within the subform and The sum command returns #Error everytime

I am however abel to get a line total but whenI try and total that field I
get same reult
Thanks
Rodger said:
Gerald,

I have to assume you are using this on a continous form. You want to
place
a textbox in the form footer and then in the control source put in
=sum([ControlName]).

That should do it . . .

Rodger

Gerald said:
Hello all I guess this will be an easy question but has me stumped.

I am trying to get a display that will calculate the running total for
the
subform for each record. I create a line total with no problems but
when I
try and add the complete group in form I get an #Error

I have tried the Sum command but doesnt seem to work any help is greatly
appreciated.

Gerald
 
Top