title: check for null value in MS Access SQL statement
body: <p>The following query is not returning values for <code>CurrentVisitor</code> in my ms access 2010 database:  </p>
  
  <pre><code>SELECT h.ClientNumber, IIf(h.CheckoutDate=null,"Yes","") AS CurrentVisitor 
  FROM VisitsTable AS h 
  INNER JOIN (
      SELECT ClientNumber, MAX(LastVisitDate) AS LastVisitStart 
      FROM VisitsTable 
      GROUP BY ClientNumber)  
      AS t 
  ON (h.LastVisitStart = t.LastVisitStart) AND (h.ClientNumber = t.ClientNumber);
  </code></pre>
  
  <p>I think the reason is that the check for null in the <code>If()</code> operation is not written correctly.  Can anyone show me how to fix this?  </p>