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!

Currency calculations for form footer

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi all,
In a continous form I have a text box (currency) in the form footer.
In the detail section I have used an unbound text box to add 2 other text boxes in the (detail section) which are used for currency totals. I now want to add all the totals in this unbound text box, in the form footer
If I use this formula in the control source:
=sum([textbox]) I get an error. If I use =nz([textbox])in the control source, I can only read the individual amounts.
How do I write a formula to get this total to work.

Many thanks.
 
The Sum aggregate can only be used on fields in the recordsource, not text boxes. Say you've assigned the following to txtTotal

[tt]=txtQuant * txtPrice[/tt]

where txtQuant is bound to the field Quant, and txtPrice is bound to the field Price.

Then you can't do

[tt]=Sum(txtTotal)[/tt]

But - you can do

[tt]=Sum(Quant * Price)[/tt]

if those are the names of the fields in the recordsource.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top