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

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
 
A

Allen Browne

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("*")
 

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

Similar Threads

Access #Error & Excel Pivot 0
Nz function 0
NZ 5
simple Query, using NZ, is Double-Counting Revenue Numbers 5
Update Query, 2007 - Not Working? 6
Calculations in query 7
Query Criteria Not Working 2
Nz or Iif 8

Top