title: Why won't this VB and SQL work?
body: <pre><code>Private Sub Text46_AfterUpdate()
  
  Dim strSource2 As String
  
  strSource2 = "SELECT [Product Code],[Stock Level],[Description] FROM [products/stock]       WHERE [Product Code] LIKE " &amp; "'%" &amp; Me.Text46.Value &amp; "%';"
  
  Me.listSource.RowSource = strSource2
  Me.listSource = vbNullString
  
  End Sub
  </code></pre>
  
  <p>It is supposed to search the database for all products that have a product code matching the value of Text46 in some way, but I really cannot get it to work and I really don't know why. listSource is the listbox that I want the information to appear in.</p>
  
  <p>Thanks in advance,
  Bob P</p>