Access 2000 Data field update
How do you remove the ? ? and the number? at the end of various length identifiers
like these D848697A-1 2408824-1 80176992-7 in an Access data field?
Software
How do you remove the ? ? and the number? at the end of various length identifiers
like these D848697A-1 2408824-1 80176992-7 in an Access data field?
by devmann
by john gordon
If the identifier ends with a - and a single number then use (where strID is a variable containing the identifier):
Left(strID, Len(strID) - 2)
Alternatively if the number at the end can have a variable number of digits then use:
Left(strID, Len(strID) - InStrRev(strID, "-"))
For an explanation of the Left, Len and InStrRev functions have a look at the Help or post back here and I will explain.
Hope this helps.
John
by devmann
What actually did it for me was;
Mid([stlID],1,InStr(1,[strlID]," - ",1)-1)
The first statement left out a few records with a "-".
The second statement removed most all data except for an occational few characters.
Thanks for attempt........GR
by devmann
This discussion is closed to new replies.
Sort by Trending