M
Maracay
Hi Guys,
I have this code to generate a file:
FileHandle = FreeFile()
Open strFileName For Output As FileHandle
On Error GoTo Err_handler
Dim rs As Recordset
Set rs = Recordset
rs.MoveFirst
Do Until rs.EOF
Print #FileHandle, Nz(Fname), Nz(LName)
Print #FileHandle, Nz(address)
Print #FileHandle, Space(10)
rs.MoveNext
Loop
Close #FileHandle
The problem is that Fname is 60 character long and in the file shows:
John Smith
And what I want is:
John Smith
I want to eliminate the empty spaces at the right, I try LTRIM and RTRIM but
didn’t work.
I have this code to generate a file:
FileHandle = FreeFile()
Open strFileName For Output As FileHandle
On Error GoTo Err_handler
Dim rs As Recordset
Set rs = Recordset
rs.MoveFirst
Do Until rs.EOF
Print #FileHandle, Nz(Fname), Nz(LName)
Print #FileHandle, Nz(address)
Print #FileHandle, Space(10)
rs.MoveNext
Loop
Close #FileHandle
The problem is that Fname is 60 character long and in the file shows:
John Smith
And what I want is:
John Smith
I want to eliminate the empty spaces at the right, I try LTRIM and RTRIM but
didn’t work.