Totaling Data in a subform

J

Jason

I have a subform that contains three columns of dollar amount. I would like
the total of all the amount to appear on my form. I thied something like =
Sum Partscost + Sum Laborcost +sum Othercost. I get an error on the output
though. any one have any suggestions. Thank you Jay
 
J

Jason

I got the first part to work but when I move it to footer I can not find the
field name. I named the field total and it does not come up in the availably
fields in the field list for the subform. Thanks for getting me most of the
way there.

devastator442 said:
Try this in the subform:
make a new text box in the subform and enter this as the control source
=Sum([Pasrtscost])+Sum([laborcost])+Sum([Othercost])
it will then add a column to the subform and will show the cost it
calculated. After you see it is correct, you can move the text box to the
footer to hide it.

Then, in your main form make another text box and say:
=Subformname.Form!Subtotal
(subformname is name of subform, Subtotal is name of that field with the
total)

gl

Jason said:
I have a subform that contains three columns of dollar amount. I would like
the total of all the amount to appear on my form. I thied something like =
Sum Partscost + Sum Laborcost +sum Othercost. I get an error on the output
though. any one have any suggestions. Thank you Jay
 
D

devastator442

Try this in the subform:
make a new text box in the subform and enter this as the control source
=Sum([Pasrtscost])+Sum([laborcost])+Sum([Othercost])
it will then add a column to the subform and will show the cost it
calculated. After you see it is correct, you can move the text box to the
footer to hide it.

Then, in your main form make another text box and say:
=Subformname.Form!Subtotal
(subformname is name of subform, Subtotal is name of that field with the
total)

gl
 
Top