Calculation in Text Box

L

Lamar

I have text box (txtTotal) on a form. It has the below expression in it.
The problem is the user has to enter information into each control before it
will calculate. I do not understand why. I want txtTotal to calculate as
soon any information is enter any control.

=[cmbBasic]+([cmbBilledYears]*2)+([cmbEmployerAddresses]*0.5)+[txtPostage]

Thank you for any help.
 
O

Ofer Cohen

Try using the Nz function to replace Null with 0

=Nz([cmbBasic],0)+(Nz([cmbBilledYears],0)*2)+(Nz([cmbEmployerAddresses],0)*0.5)+Nz([txtPostage],0)
 
Top