return record if 5th character is a letter

R

Ron5440

Hi,
I have the mid statement to pull the 5th character, but I need the
(query) syntax to filter out the ones that are a letter (alpha)
 
J

John W. Vinson

Hi,
I have the mid statement to pull the 5th character, but I need the
(query) syntax to filter out the ones that are a letter (alpha)

You don't actually need a MID at all: a criteron of

LIKE "????[a-z]*"

on the text field itself will work.

If you do use Mid, you can use

LIKE "[a-z]"

as a criterion on the extracted single character.
 
J

John Spencer

Like "????[a-z]*"
or
Mid(SomeField,5,1) Like "[a-z]"

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
R

Ron5440

Thanks guys...all answers worked.
--
Thanks,
Ron


John W. Vinson said:
Hi,
I have the mid statement to pull the 5th character, but I need the
(query) syntax to filter out the ones that are a letter (alpha)

You don't actually need a MID at all: a criteron of

LIKE "????[a-z]*"

on the text field itself will work.

If you do use Mid, you can use

LIKE "[a-z]"

as a criterion on the extracted single character.
 

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