Resetting a null field to Zero

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???
 
A

Allen Browne

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
 

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

Top