filtering a string

  • Thread starter Thread starter alejandro
  • Start date Start date
A

alejandro

One question:
i have this string : "blue chip", if i want to filter
all the records with "blue" and "chip" in any position how i must to write
the code ,

i have this code:

Dim vxor as string
Set pes = New adodb.recordset
' were me.search is a textbox with the content of the string
vxor = me.search ' i have try this but dont work
replace (vxor, " ","%")
pes.open "exec buscade @valor='%" & vxor & "%',@opc=1",cn, adopenkeyset,
adlockoptimistic

how i must write to obtain vxor="%blue%chip%"

thanks in advance

alejandro carnero
 
If it is a table you are searching for records why not use a simple query
with criteria of Like "*blue*" or like "*chip*"

If you want to code it, just copy the SQL from the query
 
Back
Top