If I understand you correctly, I think you need to put an unbound
textbox in the Form Footer section of the subform, with Control Source
set to =Sum([AmountOfGain]) then name this textbox, let's say it is
TotalGain and then the Control Source expression in the main form
textbox will be =[TradeInfo]![TotalGain]