title: Perform a search for a user input date that falls between two dates
body: <p>I have been trying to create a search that pulls up all of the records with a user specified date that falls between the start and end dates of that record. I also want to user to be able to pull it up by "Property" unless they leave it blank.</p>
  
  <p>I am very new to VBA as in started yesterday and this is the latest version that I could come up with:</p>
  
  <pre><code>Private Sub Command4_Click()
      Dim strFilter As String
  
      strFilter = [Start_Date] &lt;= Format(Me.RateDate, "Short Date") _
      And [End_Date] &gt;= Format(Me.RateDate, "Short Date")
  
      If Not IsNull(Me.Property) Then
          strFilter = strFilter &amp; " AND [Num_Code] = '" &amp; Me.Property &amp; "'"
      End If
      DoCmd.OpenReport "rpt_RatesAll", acViewPreview, , strFilter
  End Sub
  </code></pre>
  
  <p>The most recent error message returns: Run-time error '2465': Microsoft Access can't find '|1' referred to in your expression.</p>
  
  <p>Any help would be very appreciated!</p>