title: Access VBA - Apply Filter - Multiple OR conditions
body: <p>I converted my working macro to VBA script (also working) in Microsoft Access 2010:</p>
  
  <pre><code>   DoCmd.ApplyFilter "", "[Forename] Like ""*"" &amp; [Forms]![StaffTotalQuery]![StaffTotalSearchText] &amp; ""*""", ""
  </code></pre>
  
  <p>I used the same formatting (I believe) to try and extend this filter to work with multiple fields, though it doesn't work:</p>
  
  <pre><code>   DoCmd.ApplyFilter "", "[Forename] Like ""*"" &amp; [Forms]![StaffTotalQuery]![StaffTotalSearchText] &amp; ""*"" Or [Surname] Like ""*"" &amp; [Forms]![StaffTotalQuery]![StaffTotalSearchText] &amp; ""*""", ""
  </code></pre>
  
  <p>This is what I mean by doesn't work: If my data is: 
  [forename] [surname] 
    alex         bobs 
    chris        dean </p>
  
  <p>then typing, for example "alex", or "a", doesn't filter the results at all. On the other hand, the code with just one filter does narrow down the data.</p>