Help with easy query

M

marcusahle

Thanks to all in advance for reading and replying to this. In a query
I need to make sure one of the fields follows a format of ##-
Anything The first two digits can be any number 0-9 followed
directly by "-" which can be followed by anything for example:
45-2GJF454 or 91-HDN34D What do I need to put in my criteria box to
get it to follow that pattern
 
J

John Spencer

Or if there must be at least one character after the "-"
Like "##-?*"


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
D

Dale Fye

You could also use: Like "[0-9][0-9]-?*"

This is a neat feature of SQL that you can look for specific values in a
particular location in the string. For example, if you wanted to find all
the entries that contain an A, C, or E as the first character, you could use:
Like "[ACE]*"
 
Top