Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Look Inside a String Variable

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I am setting a string variable and want to check with an IF statement like:

If strSQL Like "SELECT" Then

But it doesn't work like that, and I am not really sure how to do it right.

Thanks. Sean.
 
If InStr(strSql, "Select")= 1 Then
 
However this also works

if strSql Like "Select *
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top