title: Nz() not working in MS Access
body: <p>I have a cross tab query that is counting Patient_ID's as the value.</p>
  
  <pre><code>Total = Nz(Count(Research.Patient_ID))+0
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>Total = Nz(Count(Research.Patient_ID)
  </code></pre>
  
  <p>and....</p>
  
  <pre><code>Total = Nz(Count(Research.Patient_ID, 0)
  </code></pre>
  
  <p>etc. Nz() only works if at least one value is not null. However, if all of them are null, instead of seeing all 0's, I see nothing.</p>
  
  <p>This is problematic because I am using these queries as subqueries. The main query takes the values from this one (and others like it) and adds them together. Unfortunately, if one of the subqueries is entirely null, then the sum actually turns up null, regardless of whether or not should be.</p>
  
  <p>For example:</p>
  
  <pre><code>subquery1: Nz(Count(Research.Patient_ID))+0
  
  subquery2: Nz(Count(Research.All_ID))+0
  
  mainquery: subquery1 + subquery2
  
  
  if subquery1 = 4, and subquery2 = Null...
  
  mainquery = subquery1 + subquery2
  mainquery = Null
  </code></pre>
  
  <p>when really...</p>
  
  <pre><code>mainquery = 4
  </code></pre>
  
  <p>Please help.</p>