title: MS Access : Dealing with today's date in calculated field expression
body: <p>Hi I am creating a table in MS Access to store the details of children in a school. </p>
  
  <p>I have a field called YearGroup which needs to calculate the school year they are in based on their date of birth and whether they have been moved up or down a year. </p>
  
  <p>I.e. if the expression deems they are six years old they should be placed in year 2. If they were moved down or up a year they should be in year 1 or 3 (this is based on another field in the table called YearModifier).</p>
  
  <p>The code I have at the moment is this:</p>
  
  <pre><code>Year(Now()) - IIf(Month([DOB]) &gt; 8, Year([DOB]) + 6 + [YearModifier], Year([DOB]) + 5 + [YearModifier])
  </code></pre>
  
  <p>My problem is that <code>Year(Now())</code> is returning as invalid expression. Lots of websites have recognised using the Now() function and also I've tried Date() but nothing seems to be accepted by Access (The version is 2010).</p>
  
  <p>What is going on? How can I get today's date in a calculated field expression?</p>
  
  <p>Thanks</p>