The Like operator that you use in a query's Criteria row compares values to a pattern that usually includes wild card characters. These characters are placeholders, either for 1 character or for an unknown number of characters.
Use the character: | Matches in an expression: |
---|---|
? or _ (underscore) | Any single character |
* or % | Zero or more characters |
# | Any single digit (0 — 9) |
[listofcharacters] | Any single character in listofcharacters |
[!listofcharacters] | Any single character not in listofcharacters |
Like "A*" - values that start with the letter A
Like "A????" -values that start with A but have exactly 5 characters
Like "A[d,p]*" - values that start with Ad or Ap
Like "##QR#*" - values that start with 2 digits, then the letters QR, then another digit, followed by any number of other characters. For example, the registration code for a copy of Windows 95 that comes with a new computer has the form #####-OEM-########-#####, where OEM stands for Original Equipment Manufacturer.
Last updated: September 17, 2012