Calculation in Text Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top