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

Sum text box values from a lower sort group 1

Status
Not open for further replies.

mongtrading

IS-IT--Management
Oct 14, 2001
2
AU
Application is a commodity trading system.

I want to sum the dollars of profitable trades only (i.e. exclude losing trades) for a commodity.

Sort Group 1: Commodity
Sort Group 2: TradeNumber

In the TradeNumber footer I have the following two Text Boxes:

txtTradeProfitLoss:
=Sum(IIf([BuySell]="S",[Price]*[Quantity],-1*[Price]*[Quantity]))

txtProfitableTrade$:
=IIf([txtTradeProfitLoss]>0,[txtTradeProfitLoss],0)

In the Commodity footer I want to sum txtProfitableTrade$ from the TradeNumber footer. How is this done? =Sum(txtProfitableTrade$) prompts for input.
 
Thanks Cosmo

That thread led me to Runningsum & Dlast - which gave me what I wanted.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top