title: Textbox "Like" Search
body: <p>I have a form that I want to search for anything containing what is entered into a textbox. Right now the search only picks up data that matches exactly (ie <code>MDD</code>), but I want it to capture anything containing the searched item automatically (ie <code>*MDD*</code>)</p>
  
  <p>Ideally I would like a user to enter what they are searching for and get anything that contains that search.  </p>
  
  <p>The code I wrote (that partially works) is:</p>
  
  <p>`   </p>
  
  <pre><code>If Me.tbIni = "" Or IsNull(Me.tbIni) Then
      stCriteria = ""
  Else
          If InStr(1, Me.tbIni, "LIKE ") Then
          stCriteria = "CURQCDB.DT_ini '" &amp; Me.tbIni &amp; "'"
      Else
              stCriteria = "CURQCDB.DT_ini = '" &amp; Me.tbIni &amp; "'"
  </code></pre>
  
  <p>Help would be much appreciated.</p>