Search using SQL LIKE query - can anyone see what the problem is?

VBKid04
04-14-2004, 11:01 AM
I have a search button which when pressed is supposed to perform a search.

A snippet of the code this (to save me typing it all):


Set searchRS = New ADODB.Recordset
searchRS.Open "Select * From Task Where TaskInfo= '%txtSearch%' Order By TaskID", db, adOpenStatic, adLockOptimistic


I then send the results back to the form, but there is nothing returned. The form displays saying no results found.

CrystalWizard
04-14-2004, 11:04 AM
"Select * From Task Where TaskInfo like '%txtSearch%' Order By TaskID", db, adOpenStatic, adLockOptimistic

like instead of =?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum