NZ (not nX) is a function to convert a Null value to something else --
the second argument, optional, is what you want the value to be if the
first argument is null
If you are adding
Null + anything = Null
one way that Null can be treated like a zero is to "wrap" it in the NZ
function
when you are doing arithmetic operations with numeric fields that may
not be filled out, it is best to wrap the reference with NZ
Nz([fieldname],0) -->
1. if [fieldname] has a value, it will be used
2. if not, 0 (zero) will be used
Warm Regards,
Crystal
remote programming and training
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*
have an awesome day
*
Steve,
What are the Nx and ,0 doing for the below statment?
Steve Schapel said:
Or...
=Sum(Nz([Deposits],0)-Nz([Withdrawals],0))
--
Steve Schapel, Microsoft Access MVP
Debra said:
Oops ... think I got that a little backwards
=sum([Deposits]) - Sum([Withdrawals])