I'm progamming in VB6 with a reference ADO 2.5 and an Access 2 db file.

I have a Keywords table. As a user enters a new record the two
memo fields are scanned for keywords and the Keywords table is
populated with a list keywords for that record.

I then have a search utility that allows users to search on the
keyword table. If I create a query using equals (=) sign for
an exact match the query executes and the correct number of
records are returned. However, when I use the Like
operator with astrisks, using the same keyword or a shortened
varaition, I get no records returned.

VB Code:
  1. sKeyWord = "blue"
  2. 'This first one returns 5 records
  3. sSQL = "SELECT * FROM Keywords WHERE Keyword = '" & sKeyWord & "'"
  4.  
  5. 'This one returns 0
  6. sSQL = "SELECT * FROM Keywords WHERE Keyword Like '*" & sKeyWord & "*'"
  7.  
  8. I tried this
  9. objRS.Open sSQL, objConn, adOpenKeyset, adCmdTable
  10.  
  11. And this
  12. objRS.Open sSQL, objConn, adOpenKeyset, adLockOptimistic
  13.  
  14. And This
  15. objRS.Open sSQL, objConn, adOpenStatic, adCmdTable

I tried similar queries on the Memo fields using the Like operator
and returned 0 records. When I set up a query in Access using
Like I get the correct results. The only difference in the queries
was that Access is using more brackets and appended the table
name to the field name (e.g. [Keywords.Keyword]) I tried this in
my program I returned 0 records.

What am I doing wrong?

Greg