NZ Function and Null VS 0 values

  • Thread starter Thread starter AmandaH
  • Start date Start date
A

AmandaH

Here is my question, I have the following statment in a query:

PostSumCreated: Sum(NZ([Post_Sec2_7CreatedTotal])
+NZ([Post_Sec3_5CreatedTotal])+NZ([Post_Sec4_3CreatedTotal])
+NZ([Post_Sec4_5CreatedTotal])+NZ([Post_Sec5_4CreatedTotal])
+NZ([Post_Sec6_7CreatedTotal])+NZ([Post_Sec7_4CreatedTotal]))

This returns either the number of the addition or 0. The problem is
that I have NULL values in the table, where 0 would represent that yes
nothing was done and Null would represent that nothing was support to
happen. What I need help with is trying to add the needed columns if
they have a value >= 0 or leave a blank in the table if there was
nothing entered in any of the fields. Any one have any ideas?

~Amanda~
 
Thanks for trying to help, I figure out my problem. If at least one of
those fields has a 0 in it instead of a null value then it will return
the zero.

Thanks.
 
Back
Top