Private Sub Detail_Paint()
' this is the line ought to work temporarily removed.
'Me!txtBalance = Nz(Me![txtTblIncome]) - Nz(Me![txtTblExpenses])
' this line is to test to see if the code could insert some value to Balance text box
Me!txtBalance = 55
End Sub
Private Sub Detail_Paint()
' this is the line ought to work temporarily removed.
'Me!txtBalance = Nz(Me![txtTblIncome]) - Nz(Me![txtTblExpenses])
' this line is to test to see if the code could insert some value to Balance text box
Me!txtBalance = Nz(Me![txtTblIncome])
End Sub
Private Sub Detail_Paint()
' this is the line ought to work temporarily removed.
On Error Resume Next
Me!txtBalance = Nz(Me![txtTblIncome]) - Nz(Me![txtTblExpenses])
End Sub
Or, net balance of totals?
I think you want the second one. If so, in the on format event of the area you want to have txtBalance and have:
Me!txtBalance = Me!txtTotalIncome - Me!txtTotalExpense
Me!txtBalance is an unbound text box.
Also try butting in the control source of txtBalance the following:
= Me!txtTotalIncome - Me!txtTotalExpense