I have a small MySQL database that has MS Access 2007 as its front end. One of the tables in that database contains address data across several fields. One of the fields is a zip code field called Zip. The field is 5 characters and is a text field.
I am trying to write a query that will prompt the user to enter the first FOUR digits of the zip code, which will then return all the records which match those four digits. For example, 1234 would return 12345, 12346, and 12347 and so on.
I know that Access supports [bracketed] input in queries, but I am not sure how it works for a partial match. I suspect something along the lines of:
SELECT * FROM vendors WHERE Zip LIKE [Enter 4 digits]%
But I know that query does not work, Access does not like the % symbol.
Can anyone tell me what would be the proper syntax for such a query that would allow the user to specify the first four digits and then return all the records matching those four digits?