I am trying to remoove characters from a text field such as "-". The
characters are in multiple spots in the field example 30GTN080---5--KA I
want to left justify the numbers and letters without any "-". How can I use
the trim function to do this?
Thanks
Rick Brandt - 19 May 2005 15:30 GMT
> I am trying to remoove characters from a text field such as "-". The
> characters are in multiple spots in the field example
> 30GTN080---5--KA I want to left justify the numbers and letters
> without any "-". How can I use the trim function to do this?
>
> Thanks
You can't. Trim is only for removing leading or trailing spaces.
Check Help for the Replace() function. It can do what you want.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Alex White MCDBA MCSE - 19 May 2005 15:32 GMT
you don't use the trim function for this purpose, it is for removing leading
and trailing spaces
Dim strtest As String
dim strNew as string
strtest = "12122--21212122--22222"
strNew = Replace(strtest, "-", "")
MsgBox strNew
Should do the trick

Signature
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
>I am trying to remoove characters from a text field such as "-". The
> characters are in multiple spots in the field example 30GTN080---5--KA I
[quoted text clipped - 3 lines]
>
> Thanks