title: ACCESS 2007: Determine maximum value per row across multiple columns
body: <p>I have a table with multiple date columns per employee:</p>
  
  <pre><code>   Emp 1, Date1, Date2, Date3
     Emp 2, Date1, Date2, Date3
  </code></pre>
  
  <p>etc.</p>
  
  <p>I would like to write a single query that returns to me the maximum date of the three dates available on a per-employee basis.  I understand I need to write a UNION ALL query but I can't seem to get the syntax so that I get a max value per employee record.  I keep getting the same value for all employees.  I'm sure this is a stupid error, but it's driving me nuts.  Any help would be most appreciated.</p>
  
  <hr>
  
  <p>Thank you for the prompt responses!  Is there a way to do this without using an iif statement?  I'd like to generalize it if at all possible, since there are several other date fields and it gets really unwieldy figuring out the IIF logic.</p>
  
  <p>Also, I forgot to mention that any of those dates could be empty, and the IIF logic seems to return the NULL as the maximum value.</p>