SQL like statement in VBA

  • Thread starter Thread starter Anderson
  • Start date Start date
A

Anderson

Is there a function which acts like the like * or like% statement in SQL.

Your help will be appreciated.

thanks
 
Wrong forum, hould be posted in queries, but ...

Your like '*' will work in sql if you include in your where clause.

Why don't you use the sql view of the query by design to view a like phrase.

Example of Like '*' is below.



SELECT tblcustomer.cust_name
FROM tblcustomer
WHERE tblcustomer.cust_name Like '*';

Griffo.
 
Yes. It is.... Like.

Example:
Dim bStatus as boolean

bStatus = "Hello" Like "*ello"

See help for more details! Good Luck
 
Check yourself before you speak. This was an appropriate question for VB.
Your response shows your experience! String searches using regular
expressions/pattern matching are often performed outside of SQL. VB supplies
the same keyword/function "Like" for just such occasions. Have a good one!
 
Misread the question, and therefore my answer was inappropriate, as was your
response to me attempting to help someone. Do you have many friends?
 
Sorry i am actually trying to do this in excel VBA hence the question.

Take a look at the InStr() function in VBA help.

Note that there are Excel newsgroups, and a
microsoft.public.access.modulesdaovba newsgroup specifically for VBA
questions; if you're using Excel, you might want to look in one of
these groups rather than in the Access Forms newsgroup!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top