I have a search need to get the EXACT Name...No LIKE function
It's currently this:
Wh = "" If IsNull(SearchTerm) Then SearchTerm = "" S = Trim(SearchTerm) If Left(S, 1) = """" Then ' whole phrase search S = Replace(S, """", "") Wh = "FilmName LIKE ""*" & S & "*""" ElseIf InStr(S, " ") <> 0 Then ' have spaces Wh = "FilmName LIKE ""*" Wh = Wh & Replace(S, " ", "*"" OR FilmName LIKE ""*") Wh = Wh & "*"" " Else ' no space Wh = "FilmName LIKE ""*" & S & "*""" End If If Wh <> "" Then Wh = "WHERE " & Wh
I want to remove the likes but it doesn't seem to work after...How do I make it so that it is the exact Film Name?
Reply from Alex Hedley:
Change "FilmName LIKE ""*" & S & "*"""
to "FilmName='" & S & "'"
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Search Seminar.