General discussion

Locked

Access 2000 Data field update

By devmann ·
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?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by devmann In reply to Access 2000 Data field up ...

Point value changed by question poster.

Collapse -

by John Gordon In reply to Access 2000 Data field up ...

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

Collapse -

by devmann In reply to

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

Collapse -

by devmann In reply to Access 2000 Data field up ...

This question was closed by the author

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums