A family of Microsoft relational database management systems designed for ease of use.
As I said you are referencing text box names rather than fields.
You need to repeat the calculation like this --
Instead of using -- txtcontractbal=[contractamount]-[txttotalpayment]-[txtretention]
use -- txtcontractbal=[contractamount] - ([SubFrmContractPayment].[Form]![txtPaymentTotal]) - [txtretention]
Do the same for the others.