How to set a null value to '0'

  • Thread starter Thread starter cb
  • Start date Start date
C

cb

I am creating an order entry form. I want to set the the sub-total field for
rows with no data in them to zero. Thanks in advance.
 
cb said:
I am creating an order entry form. I want to set the the sub-total field
for rows with no data in them to zero. Thanks in advance.

If you have several numeric fields, use Nz() around each one. For example:
=Nz([Parts], 0) + Nz([Labor], 0) + Nz([Tax], 0)
 
I am creating an order entry form. I want to set the the sub-total field for
rows with no data in them to zero. Thanks in advance.

A couple of ways; probably the simplest is to use a Format property for the
textbox of

#;-#;0;0

to display the number (with or without a minus sign respectively) for positive
and negative values, and display 0 for zero or NULL values.
 
Back
Top