Hi i would like to know how to do the following:
I have a search scripts that works nicely to search my postal codes in my database but i want to have it so it searches only the first 2 caracters in the postal code, right now it queries any caracters in the postal code and outputs all the postal codes that has the field that the user enters in the search field.
This is the query part of the search can someone modify it to my needs and show me how I can do what i'm trying to do.
Code:
' Build our query based on the input.
strSQL = "SELECT *" _
& "FROM uic " _
& "WHERE unitpostalcode LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
'& "OR unitpostalcode LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
'& "ORDER BY unitpostalcode;"
Thank you very much.