Myph
Nov 2nd, 2000, 12:38 PM
I have this code:
'**********************************************************
objRS.Open "Select Machine_Name, Login_User FROM Location_Chart WHERE Machine_Name = '"&GetMachineName&"'",dbConn
strLoggedInUser = Trim(Lcase(objRS("Login_User")))
strUserSearch = Trim(Lcase(Request("strUserSearch")))
IF strLoggedInUser = strUserSearch THEN
strBGColor = "tan"
END IF
'*********************************************************
Let's say that the value of strLoggedInUser is Draughn.
I want it so that even if strUserSearch is "rau" it will still find the word Draughn.
I thought that it would be something like:
'******************************************************
IF strLoggedInUser LIKE "%" & strUserSearch & "%" THEN
strBGColor = "tan"
END IF
'******************************************************
but that is not working properly. I have tried it with "*" and '%%" nothing seems to work right. can someone help me with this? Thanks
'**********************************************************
objRS.Open "Select Machine_Name, Login_User FROM Location_Chart WHERE Machine_Name = '"&GetMachineName&"'",dbConn
strLoggedInUser = Trim(Lcase(objRS("Login_User")))
strUserSearch = Trim(Lcase(Request("strUserSearch")))
IF strLoggedInUser = strUserSearch THEN
strBGColor = "tan"
END IF
'*********************************************************
Let's say that the value of strLoggedInUser is Draughn.
I want it so that even if strUserSearch is "rau" it will still find the word Draughn.
I thought that it would be something like:
'******************************************************
IF strLoggedInUser LIKE "%" & strUserSearch & "%" THEN
strBGColor = "tan"
END IF
'******************************************************
but that is not working properly. I have tried it with "*" and '%%" nothing seems to work right. can someone help me with this? Thanks