If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
return record if 5th character is a letter
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) -- Thanks, Ron |
#2
|
|||
|
|||
return record if 5th character is a letter
UCase(Mid(MyString, 5, 1) = "A" AND UCase(Mid(MyString, 5, 1) = "Z"
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Ron5440" wrote in message news 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) -- Thanks, Ron |
#3
|
|||
|
|||
return record if 5th character is a letter
On Mon, 17 May 2010 12:36:01 -0700, Ron5440
wrote: 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. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
return record if 5th character is a letter
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 Ron5440 wrote: 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) |
#5
|
|||
|
|||
return record if 5th character is a letter
Thanks guys...all answers worked.
-- Thanks, Ron "John W. Vinson" wrote: On Mon, 17 May 2010 12:36:01 -0700, Ron5440 wrote: 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. -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|