Filtering question

G

Guest

Hello,

In a field there are entries starting with letters and ending with numbers.
For example:

ABC12345
AA2564
ABB7785
A2345

How can I filter which entries have 3 letters in the beggining before the
numbers? Or 2 letters if I need to?

Thank you
Dimitris
 
B

Brendan Reynolds

Dimitris said:
Hello,

In a field there are entries starting with letters and ending with
numbers.
For example:

ABC12345
AA2564
ABB7785
A2345

How can I filter which entries have 3 letters in the beggining before the
numbers? Or 2 letters if I need to?

Thank you
Dimitris


Here's an example of a query that will return only rows where the specified
field begins with two characters (A to Z inclusive) followed by a number (0
to 9 inclusive). See "LIKE Operator" in the help files for more
information.

SELECT tblTest.*
FROM tblTest
WHERE (((tblTest.TestText) Like "[A-Z][A-Z][0-9]*"));
 
J

John Spencer

Criteria of
Like "[A-Z][A-Z][A-Z]*"
will filter the records to only show the those that start with three letters

Alternatively you could try the following with Access
Not Like "###*"
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top