|
-
May 16th, 1999, 02:54 AM
#1
Trimming a string?
I did a sql statement to select a user name.
Dim strName as String
...
...
The Access database has a text with a length being 128
however I selected a name "Sam Winston" which has a length less then 128. I get the following
info in strName
strName = "Sam Winston " up to 128 bytes.
Is there a way for me to trim of all the spaces after the last name so it looks like this:
strName = "Sam Winston"
Thanks
-
May 16th, 1999, 10:27 AM
#2
Re: Trimming a string?
YourStrim = RTrim("YorString ") gives you YouString without leading spaces.
-
May 17th, 1999, 01:11 AM
#3
Re: Trimming a string?
strString = RTrim$(strString) 'will trim spaces on right
strString = LTrim$(strString) 'will trim spaces on left
strString = Trim$(strString) 'will trim spaces on both left and right
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|