andycharger
Well-known member
- Joined
- Apr 2, 2003
- Messages
- 152
Hi.
Im trying to trim spaces out of my Users names when I retrieve them from my SQL Server Database. Basically, I am pulling the first name and last name out and sticking them into a variable.
The problem is that If im called "Joe Bloggs" It is retrieving "Joe " and "Bloggs " making me "Joe Bloggs "
So I tried removing the spaces using Trim and Replace commands but neither seem to work. Can anyone help me with an alternative?
Here is my code:
Cheers
Im trying to trim spaces out of my Users names when I retrieve them from my SQL Server Database. Basically, I am pulling the first name and last name out and sticking them into a variable.
The problem is that If im called "Joe Bloggs" It is retrieving "Joe " and "Bloggs " making me "Joe Bloggs "
So I tried removing the spaces using Trim and Replace commands but neither seem to work. Can anyone help me with an alternative?
Here is my code:
Code:
strFName = oReader7("FirstName")
Replace(strFName, " ", "")
strLName = oReader7("LastName"
Replace(strLName, " ", "")
strName = strFName & " " & strLName
Cheers