Hi everyone
I have a database of postcodes. People go onto our website to book a place at our events. However if the postcode they entered is not in the database they will receive an email.
I have used the sql like and wildcard functions and they work well, the problem is, the postcode entered by the user is longer than the postcodes in my database.
For example in the database the postcode is only the first 3/4/5 characters (i.e. CV37 6) and a user will type in their full postcode (i.e. CV37 6KL)
Here is my sql statement:
strSQL = “SELECT * FROM postcodes_DB WHERE postcodes LIKE '” & search & "%’ "
So if I type in the full postcode in the field, I would like CV37 6 come up in the search results. How can I make this happen?
Hope that makes sense.
Any advice/help?
Thanks