Lynn_AccessUser
Registered User.
- Local time
- Yesterday, 19:22
- Joined
- Feb 4, 2003
- Messages
- 125
I have the following sample data:
LON09844
NUOS00101
NU-U00092
I am trying to subtract one from the end number. The following code worked until I realized not all of the number sequences began with 0.
NewField: Left$([BegBates],InStr(1,[BegBates],"0")-1) & Format((Right([BegBates],5)-1),"00000")
As a result, I am getting errors on the following sample fields:
LON19514
LON20937
LON90029
Is there a way to perform the left function to the first number instead of to a particular number/character or length.
For example, return all of the letters on the left up to the first digit. So I would see:
LON09844 LON
NUOS00101 NUO
NU-U00092 NU-U
LON19514 LON
LON20937 LON
LON90029 LON
Thank you!
LON09844
NUOS00101
NU-U00092
I am trying to subtract one from the end number. The following code worked until I realized not all of the number sequences began with 0.
NewField: Left$([BegBates],InStr(1,[BegBates],"0")-1) & Format((Right([BegBates],5)-1),"00000")
As a result, I am getting errors on the following sample fields:
LON19514
LON20937
LON90029
Is there a way to perform the left function to the first number instead of to a particular number/character or length.
For example, return all of the letters on the left up to the first digit. So I would see:
LON09844 LON
NUOS00101 NUO
NU-U00092 NU-U
LON19514 LON
LON20937 LON
LON90029 LON
Thank you!