Trimming off certain numbers

  • Thread starter Thread starter Chris Fromm
  • Start date Start date
C

Chris Fromm

How would I go about trimming off only certain trailing
numbers from a non-fixed width field? In other words, if
I want to trim off "999" everytime it occurs at the end
of a number, no matter how long the number string is,
what should I do?
 
If Right([MyField],3) = "999" Then
MyField = Left([MyField],Len([MyField] - 3)
End If
 
Thanks Marleen!
-----Original Message-----
If Right([MyField],3) = "999" Then
MyField = Left([MyField],Len([MyField] - 3)
End If

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


Chris Fromm said:
How would I go about trimming off only certain trailing
numbers from a non-fixed width field? In other words, if
I want to trim off "999" everytime it occurs at the end
of a number, no matter how long the number string is,
what should I do?


.
 
Back
Top