Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a total from a subform 1

Status
Not open for further replies.

Heeeeelp

Technical User
Jan 5, 2006
39
CA
Hi everyone,

I have a form named Orders by Customers and a subform named Order by Customers Subform. The form Orders by Customers has a field to store the total volume of sales called VolumeSalesDollars. I would like to store the total amount in this field which would be pulled by added all the Total Sale amounts which appear in the subform. The field in the subform that stores the totals is called "total sale" and displays the combined total for each order in dollars. This is an unbound text box with the following code:
=[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]

I would appreciate some help with the code to pull the grand total of all orders from the total sale field so that I can store it on the form.

Thank you,
Tess
 
How are ya Heeeeelp . . .

try this:
[ol][li]Sum the subform field by using a [blue]calculated control in the subform's form footer[/blue].[/li]
[li]Reference the calculated control from the main form to display the summed value.[/li]
[li]ControlSource: =subFormName.Form!SumControlName[/li][/ol]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top