M
Maracay
Hi Guys,
At work there is a very old production printing machine, the machine use a
DBASE data base program, the file is a .LST, the process to generate this
file is very manual, I created a program in access to speed up the generation
of this file, everything works but the final .LST file, I checked one of the
old file, and each line is formatted to 60 characters even when there are
more than 1 field printed in the line. When my file runs in the machine the
information is all over the place, the old file shows every line into a 60
charactersformat.
Sorry if it sounds confusing, if someone knows how to solve this problem or
have any question please let me know.
This is part of my code:
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)
Print #FileHandle, Trim(Nz(City, "")) & " " & Trim(Nz(Province, ""))
& " " & Trim(Nz(PostalCode))
Print #FileHandle, Space(10)
rs.MoveNext
Loop
Close #FileHandle
sExit:
Set rst = Nothing
Me.Requery
Exit Sub
Err_handler:
MsgBox Err.Description
Resume sExit
Close #FileHandle
End If
Thanks
At work there is a very old production printing machine, the machine use a
DBASE data base program, the file is a .LST, the process to generate this
file is very manual, I created a program in access to speed up the generation
of this file, everything works but the final .LST file, I checked one of the
old file, and each line is formatted to 60 characters even when there are
more than 1 field printed in the line. When my file runs in the machine the
information is all over the place, the old file shows every line into a 60
charactersformat.
Sorry if it sounds confusing, if someone knows how to solve this problem or
have any question please let me know.
This is part of my code:
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)
Print #FileHandle, Trim(Nz(City, "")) & " " & Trim(Nz(Province, ""))
& " " & Trim(Nz(PostalCode))
Print #FileHandle, Space(10)
rs.MoveNext
Loop
Close #FileHandle
sExit:
Set rst = Nothing
Me.Requery
Exit Sub
Err_handler:
MsgBox Err.Description
Resume sExit
Close #FileHandle
End If
Thanks