I am using Excel 2007 MS Query with an ODBC database query to a SQL database

I have successfully set-up the parameter query. When I enter the full and complete part number containing text, numbers and characters, the query works perfectly. No results are returned when I enter a partial number.

I have tried using with and without a wildcard character in the parameter entry window.

I am using the following query LIKE ’%’+[Enter part number]+’%’

Example: searching for part number “12345-890” then results returned as expected. When I enter 345, %345% or *345* nothing is returned.

I have swapped out “*” for “%” using 1 and two quotes. I have also tried '&' instead of "+"Sometimes I get a varchar/nchar error, most of the time it is a syntax error

However, I did discover that when I copy the same formula into the customer name field which is all alpha characters it works correctly.

I'm thinking it has to do with being a text field verses a mixed model character set having text, numbers and characters. Would this make a difference and if so, how would I correct it?

An earlier post had a similar problem and one solution was to add VBA coding. I don’t know VBA, nor am I able to get this in place. I’m looking for a solution inside of MS Query. Has anyone solved this problem inside MS Query.