View Full Version : sum of subform


doug13
04-09-2001, 03:26 PM
I have a product price and a product quantity column, in a subform of a form for order taking. The subform multiplys the price and qty to give a total.

How do i sum these totals that are currently in the subform for this order, and place them in the final total of the main order form?

davidwilliams
04-10-2001, 04:50 AM
Greetings from Ireland.

In the footer of your subform place a text box with the control set as =Sum([Total]), Total being the name of the field you want to sum. This will give you the Grand Total for the records displayed in your subform.

In your mainform place a textbox with the control source set as
=[Subform Name].[Form]![FieldName]
Example: If the name of your subform is [Orders Subform] and the name of the field you want to display is [Grand Total] the syntax ,in the control source property, for displaying this field would be:
=[Orders Subform].[Form]![Grand Total].

I hope this is of help.

fredfortsonsr
04-15-2001, 07:30 PM
I am at a loss for why the result of my control still ends up showing #Name.

The subform works and the total is displayed. The field name for the total is [TotalConcPct].

On the Main form I entered into the text box controlsource: =[Component Gas subform].[Form]![TotalConcPct]

The subform name is [Component Gas subform].

Based on the explanation this is what I should have entered. What could be going wrong?

Fred

Rich
04-15-2001, 11:50 PM
Try =[Forms]![MainformName]![Component Gas subform].[Form]![TotalConcPct]