Hi,
The rule of thumb is that you don't store calculated fields in a table, only in a query, or on a form or report. Since the values are calculated dynamically, there is no need to store the data.
That said, to put this in a query, you would create a query with the table in it, and then use this formula in the query Field: box
ClosingBalance:([OpeningBalance] + [Installment])
To put this in a form or report, create an unbound text box, and then put this formula in the text box in design view:
Report
=Sum([OpeningBalance] + [Installment])
Form I think would be:
=Sum(Me.OpeningBalance + Me.Installment)
I would have to play around with that syntax to make sure it was right for the Form.
I am not sure why you would want to set a default value on your closing balance, since it would be calculated in the query. But to do that in a table, you open the table designer, select the field, and put in a Default Value:
HTH
mmcdonal
|