I have a field that holds item numbers. They are usually a number, but sometimes contain other characters and/or spaces.
e.g.
123456
456789
789123
ABC123
BLAH01
456 XYZ
When I query this field using LIKE and a wildcard, I am not seeing any all numeric results:
WHERE ItemNumber LIKE '*A*' returns "ABC123" and "BLAH01"
WHERE ItemNumber LIKE '*123*' returns "ABC123" but not 123456 or 789123
WHERE ItemNumber LIKE '*456*' returns "456 XYZ" but not 456789
What's going on here? Is there some wildcard syntax that I'm not aware of or is access secretly formatting all numeric strings as numbers?
(I am using this query to populate a list box based on user input. Whatever the user types in would get placed between the asterisks. e.g. '*'&Input&'*')
e.g.
123456
456789
789123
ABC123
BLAH01
456 XYZ
When I query this field using LIKE and a wildcard, I am not seeing any all numeric results:
WHERE ItemNumber LIKE '*A*' returns "ABC123" and "BLAH01"
WHERE ItemNumber LIKE '*123*' returns "ABC123" but not 123456 or 789123
WHERE ItemNumber LIKE '*456*' returns "456 XYZ" but not 456789
What's going on here? Is there some wildcard syntax that I'm not aware of or is access secretly formatting all numeric strings as numbers?
(I am using this query to populate a list box based on user input. Whatever the user types in would get placed between the asterisks. e.g. '*'&Input&'*')