Help with easy query

  • Thread starter Thread starter marcusahle
  • Start date Start date
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
 
Use the following critria:
Like "##-*"

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
Use the following critria:
Like "##-*"

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)






- Show quoted text -

Thank you much!
 
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
..
 
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]*"
 
Back
Top