title: Passing date criteria from a form to a query in Access
body: <p>This should be pretty easy, but it's not working and I know I've done it before.</p>
  
  <p>I have a Date field on a form:</p>
  
  <p><img src="https://i.stack.imgur.com/HpfGw.jpg" alt="enter image description here"></p>
  
  <p>Property is set to a ShortDate for the date field:</p>
  
  <p><img src="https://i.stack.imgur.com/2rFjT.jpg" alt="enter image description here"></p>
  
  <p>I've got some code on the back end to make sure it always gets set to the last day of the month:</p>
  
  <pre><code>Me.txtReportDate.SetFocus
  Me.txtReportDate.Text = DateAdd("d", -1, DateSerial(Year(Forms!frmRunQueries.txtReportDate), Month(Forms!frmRunQueries.txtReportDate) + 1, 1))
  Me.Refresh
  </code></pre>
  
  <p>And in the query, I'm setting one of the dates to be equal to the date on the form:
  <img src="https://i.stack.imgur.com/RVdDp.jpg" alt="enter image description here"></p>
  
  <p>If I set that as:</p>
  
  <pre><code>=#5/31/15#
  </code></pre>
  
  <p>I get data.  If I leave it with the field reference in it, I don't.  Any ideas on what I could be doing wrong?</p>