Simple Like query

Simple Like query

Post by Mike » Wed, 12 Jan 2005 22:32:59


I'm trying to set up a simple DAP that will read a csv file exported by an
accounting app. Problem is I can't get the Vbscript lookup command to match a
partial string - you have to match the entire name or it won't work. I'm
using this code straight from the help file:

rs.find "Name = '" & CStr(InputBox("Please enter customer to find", "Find"))
& "'"

XXXX@XXXXX.COM

Thanks (I hope).
 
 
 

Simple Like query

Post by Ken Snell » Thu, 13 Jan 2005 00:16:18

Try this:

rs.find "Name Like '%" & CStr(InputBox("Please enter customer to find",
"Find")) & "%'"


--

Ken Snell
<MS ACCESS MVP>

 
 
 

Simple Like query

Post by Mike » Thu, 13 Jan 2005 22:28:54


$ XXXX@XXXXX.COM :

I ended up using a filter command which took me about 4 hours of searching to
find. This is what I ended up with

rs.filter = "Name LIKE '" & CStr(InputBox("Please enter customer to find",
"Find")) & "*'"

I thank you for your reply.

Mike Lazenby.