Resetting a null field to Zero

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

Guest

I have a form with currency fields. I have the fields defaulting to zero to
start. These fields are involved in calculations on the form. If the user
blanks out one of these currency fields, the formulas won't work. Is there
an easy way to set the emptied fields back to zero???
 
It would be possible to write some code that loops through all the controls
on the form, test IsNull() and assigns zero if appropriate.

It would be easier to fix the formula so it worked.
Generally this is just a matter of adding Nz() in the right places.

It is important to learn to work with nulls. If you have had difficulties,
this article describes the 6 places where people frequently get tripped up,
and how to solve them:
Common Errors with Null
at:
http://allenbrowne.com/casu-12.html
 
Back
Top