Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

trim function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tony8659 - 19 May 2005 15:23 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
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.