title: First Day Of Month For Calculated Number Of Months
body: <p>I'm running into an issue where I need some more guidance. I've got a form that allows users to enter a start date and end date to represent the length of a contract. I'm using the following query to calculate the monthly amount :</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT t_Actuals.InvoiceAmount,
   (DateDiff("m",[StartDate],[EndDate])+1) AS [Contract Term],
   CCur(Round(([InvoiceAmount]/[Contract Term]),0)) AS MonthlyAmount
   FROM t_Actuals;
  </code></pre>
  
  <p>Our VP wants the MonthlyAmount projected throughout the length of the Contract Term (ie. 11 months from Start Date). Ideally, I would like to allocate the MonthlyAmount in a MM-YYYY (01/2012, 02,2012) format throughout the length of the contract term, but, admittedly, I am not that experienced with working with dates in Access outside of the Query Grid.</p>
  
  <p>Regardless, I've been reading about the DateSerial function to find the first day of the month, but how would you implement that into a loop to find the value of the first date of the month for the next 36 months and write that date to a table with the projected date as fldDate and MonthlyAmount. </p>
  
  <p>Sorry, this is kind of a convuluted question. Any advice would be greatly appreciated. Thank you in advance for any direction. </p>