Typically, you do not store the results of a calculation in a table. It
breaks 3NF. There are certain circumstances when it is permissible:
1. History needs to be maintained and all the elements of the calculation
are not available. Example, the results of a sale where the sales tax
history is not stored, or the results of a paycheck when the hourly wage
history is not stored.
2. There is excessive amount of time or cpu cycles involved in processing.
(i.e. you shouldn'y need to wait a minute or 2 to see a small report.)
To accomplish what you need, the easiest method is to bind the textbox named
Total to the field of that name in the table, then use some code like this
in the after update event of each of the contributing textboxes:
Private Sub SubtotalB_AfterUpdate()
If Len(Me.[Prepayment] & vbNullString) > 0 Then
Me.Total = [SubtotalB]-[Prepayment]
End If
End Sub
and:
Private Sub Prepayment_AfterUpdate()
If Len(Me.[SubtotalB] & vbNullString) > 0 Then
Me.Total = [SubtotalB]-[Prepayment]
End If
End Sub
Now, as soon as there is a value in both textboxes, Total will have a value
that will be stored in the table. Remember, do not do this if you can
recalculate every time you open your form.