title: MS Access - Search by Text Box
body: <p>I'm relatively new to Microsoft Access but I've been using the same code below from another database and replacing it with the ones you see below.</p>
  
  <pre><code>strsearch = Me.txtSearch.Value
  Task = "SELECT * FROM t_Cases WHERE ((CaseID Like ""*" &amp; strsearch &amp; "*"") OR (ActiveYN Like ""*" &amp; strsearch &amp; "*"") OR (ClaimType Like ""*" &amp; strsearch &amp; "*"") OR (HousingLocation ""*" &amp; strsearch &amp; "*"") OR (GrievanceAddress Like ""*" &amp; strsearch &amp; "*""))"
  Me.RecordSource = Task
  Me.OrderByOn = True
  </code></pre>
  
  <p>There is a text box named <code>txtsearch</code> and the records on the form are meant to be filtered on the written text box selection. However, I'm getting a <code>runtime error '3075'</code> stating syntax error (missing operator) in the query expression. Can someone please help me identify what is the syntax error in this? I thank you greatly for any assistance you can offer.</p>
  
  <p>Jon</p>