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
Steve - 26 Jun 2007 20:26 GMT
Use the following critria:
Like "##-*"
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com
> 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
marcusahle - 26 Jun 2007 20:44 GMT
> Use the following critria:
> Like "##-*"
[quoted text clipped - 12 lines]
>
> - Show quoted text -
Thank you much!
John Spencer - 26 Jun 2007 20:47 GMT
Or if there must be at least one character after the "-"
Like "##-?*"

Signature
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Use the following critria:
> Like "##-*"
[quoted text clipped - 10 lines]
>> 45-2GJF454 or 91-HDN34D What do I need to put in my criteria box to
>> get it to follow that pattern
Dale Fye - 27 Jun 2007 13:24 GMT
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]*"
> 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