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!

Sum function for calculated values

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
I need to sum the contents of a textbox on a report. But the contents of this text box are calculated from other text boxes present on the report - the text box I want to sum contains a formula. How can I obtain this total?, at the moment it asks me to insert parameter value.

Thanks

Steph
 
Steph,

Say the control name with the formula is "SubTotal"

then in another control (called "Total") have: "=[SubTotal]" in the Control Source

Think that should do it.

Hope it helps :)

Aubs
 
Steph,

When computing a total with an aggregate function or formula you can't use the name of a calculated control in the Sum function. You must repeat the expression in the calculated control. So, repeat the calculation in your report footer.

For example, if the control you want to sum had:
Code:
 =[Qty] * [Price]
then the control source in your report footer would be:
Code:
=sum([Qty] * [Price])
 
Yes, thank you. In the end I used a running sum in the text box and then in the report footer, referred to this text box and therefore obtaining the last value and the total.

Thanks for your help.

Steph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top