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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of subform 1

Status
Not open for further replies.

Yardyy

Technical User
Aug 13, 2002
448
GB
Hi, Could someone please show me how to do a simple total of a field on a subform. I have this form with customers details, when selected a customer it shows a subform with the jobs that have been completed for that customer, on the subform there is a field called charges. some customer have many jobs that hvae been completed, how can i total the charges for the customer on the main form.

Many thanks this has been buggin me for weeks.

Many Thanks
Yurov Ardyy
 
How are ya Yardyy . . .
[ol][li]Sum the subform field by using a [blue]calculated control in the subform's form footer[/blue] (control can be hidden).[/li]
[li]Reference the calculated control from the main form to display the summed value.[/li][/ol]

[blue]Your Thoughts? . . .[/blue]

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

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hi TheAceMan1 I am not sure how to sum the subform, i have a form footer with a label named summerff, not sure how to do a sum on that ??

i know how to referance the field of the subform after that on the main form, its just the first bit that i dont know how to do..

Many Thanks
Yurov Ardyy
 
Yardyy . . .

In the [blue]ControlSource[/blue] of the subform footer textbox try:
Code:
[blue]=Sum(Nz([[purple][B][I]SumFieldName[/I][/B][/purple]]))[/blue]

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

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks to both of you, I have got this working now. i copied the example in the zip file, and its working great. This is really a good place.

Many Thanks
Yurov Ardyy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top