I'm trying to wirte a query that will display a certain text string. I want
to find all the records that one field is formatted in a certain way. I need
to see the records that start with 3 numeric values followed by 2 alpha
characters and then 3 numeric values ie 123AA456. In the criteria cell I
write Like "###??###" . This doesn't work as it displays records where all
the characters in ther field are numeric. Does anyone know how to do what I
need?
Pete Provencher
I figured it out. I used Like "###[a-z][a-z]###"
> I'm trying to wirte a query that will display a certain text string. I
> want to find all the records that one field is formatted in a certain way.
[quoted text clipped - 5 lines]
>
> Pete Provencher
Jamie Collins - 28 Jul 2006 12:02 GMT
> I figured it out. I used Like "###[a-z][a-z]###"
A slight improvement would be
LIKE '[0-9][0-9][0-9][A-Z][A-Z][0-9][0-9][0-9]'
This has the advantage of being able to work in both 'ANSI' (e.g. ADO)
and non-'ANSI' (e.g. DAO) modes.
Jamie.
--