NZ([value],0) query export & Calculations

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

Guest

I have a query that I subistute 0 for null values . I use this field in a
second query. When I export to excel I can't preform any calculations on that
value. I can on the original query but not the query using the subquery. I
have tried nz in both and in one and not the other (both ways). If I dont use
the nz and preform calculations it works but I have blanks/nulls but I need
the 0 in those places.

Reschedule: Count(nz([Equipment.Center],0)) done as an expression
 
JET may not understand the data type of the calculated field correctly.
Try typecasting the Nz() result, e.g.:
CLng(Nz([Equipment.Center],0))
More info:
http://members.iinet.net.au/~allenbrowne/ser-45.html

Your example counts the number of fields that have a value, and the Nz()
substitutes a zero if they don't have a value. This would give the same
result as:
Count("*")
 
Back
Top