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

SUBTOTALS using subform in a form

Status
Not open for further replies.

Ma3x323

Programmer
Jun 27, 2001
148
US
OK I got all these items in a subform and on the last column is a Price field. The subform is in tabular form. The subform is in a form and on the footer of this form is of course : SUBTOTALS : ___________
TAX: ___________
GRANDTOTAL: ___________

Now, I can do the tax and grandtotal based on the subtotals. But how do I code the text box for Subtotals so it adds all the prices of the items in the subform?
Any suggestion is a great suggestion.

Thanks,
Feryl
 
Feryl,

There may be an easier way, but this is how I accomplished it:

I defined a non-visible text box (txtSumPrice) in the footer of the subform that had as its control source: =sum([price])

Then, in the form I have a text box with the following as its control source: =[frmPrice subform].[Form]![txtSumPrice]
 
Thanks Cosmo. I don't even know why I didn't think about that. Awesome idea.
I had to use VDA coding to do it but it had lots of flaws.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top