To extend my answer, if you show the data in lets say MyGrid in columns AccountColumn, AmountColumn and PercentColumn (this one is an additional one), simply do:
In the Form.MyGrid.AmountColumn.Text1.Valid put:
SUM ALL amount TO lnTotalSum
THISFORM.MyGrid.PercentColumn.Refresh()
Then in the...