title: DoCmd.ApplyFilter Syntax
body: <p>I'm having a little trouble applying a filter that refers to multiple text boxes in a form for the Where Condition. </p>
  
  <p>I have a button called Search_All, and am trying to set up the first two text boxes:</p>
  
  <pre><code>Private Sub Search_All_Click()
         DoCmd.ApplyFilter , "[ESN] like '*' &amp; [Forms]![Search]![ESN TEXT]  &amp; '*' Or [CommentsField] like '*' &amp; [Forms]![Search]![COMMENTS TEXT] &amp; '*'"
  End Sub
  </code></pre>
  
  <p>I can enter a value for ESN and filter successfully, but when I enter something into the COMMENTS TEXT it filters everything out and doesn't display any records.</p>