filtering a string

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
 
P

Phil Stanton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top