remove letters from an alpha-numeric field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a text field that has an alpha-numeric field (the first three digits
are letters followed by either 6 to 8 numbers) example AUX12345678 and i need
to remove the letters and just extract the numbers.

how do i do this?

james
 
JamesMSMBA2005 said:
i have a text field that has an alpha-numeric field (the first three
digits are letters followed by either 6 to 8 numbers) example
AUX12345678 and i need to remove the letters and just extract the
numbers.

how do i do this?

james

If it's always the first three characters you want to drop, use the
Mid() function in a query expression:

Mid([YourField, 4)

That will return everything from the 4 character on.
 
What would be the command to display the results if an alpha character were
found ANYWHERE in the field?

Dirk Goldgar said:
JamesMSMBA2005 said:
i have a text field that has an alpha-numeric field (the first three
digits are letters followed by either 6 to 8 numbers) example
AUX12345678 and i need to remove the letters and just extract the
numbers.

how do i do this?

james

If it's always the first three characters you want to drop, use the
Mid() function in a query expression:

Mid([YourField, 4)

That will return everything from the 4 character on.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
This will do it

Function fcnStripAlpha(strString) As Long
Dim x As Long
Dim zz As Variant
For x = 1 To Len(strString)
If IsNumeric(Mid(strString, x, 1)) Then
zz = zz + Mid(strString, x, 1)
End If
Next x
fcnStripAlpha = zz
End Function

UpRider

DubbleD said:
What would be the command to display the results if an alpha character
were
found ANYWHERE in the field?

Dirk Goldgar said:
JamesMSMBA2005 said:
i have a text field that has an alpha-numeric field (the first three
digits are letters followed by either 6 to 8 numbers) example
AUX12345678 and i need to remove the letters and just extract the
numbers.

how do i do this?

james

If it's always the first three characters you want to drop, use the
Mid() function in a query expression:

Mid([YourField, 4)

That will return everything from the 4 character on.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top