M
Maracay
Hi Guys
I use the code below to generate a text file on the disc, I used SET
rs=Recorset but because I read the whole file the information pass thru the
form and takes longer, someone said me to use Set rs = Me.RecordsetClone
instead to avoid this problem, I did it, is quick but is repeating the first
record in the whole file, I have research the topic but I haven’t find any
sequential read, all of then use find…, I will appreciate any help.
Thanks
FileHandle = FreeFile()
Open strFileName For Output As FileHandle
On Error GoTo Err_handler
Dim rs As Recordset
' Set rs = Recordset
Set rs = Me.RecordsetClone
rs.MoveFirst
Do Until rs.EOF
nCountLines = 4
AddedExpre1 = Expre1
strLine = Left(Mid((" " + Company), 2) & Space(60), 60)
Print #FileHandle, strLine
strLine = Left(Mid((" " + Fname) & (" " + LName), 2) & Space(60), 60)
Print #FileHandle, strLine
rs.MoveNext
Loop
Close #FileHandle
I use the code below to generate a text file on the disc, I used SET
rs=Recorset but because I read the whole file the information pass thru the
form and takes longer, someone said me to use Set rs = Me.RecordsetClone
instead to avoid this problem, I did it, is quick but is repeating the first
record in the whole file, I have research the topic but I haven’t find any
sequential read, all of then use find…, I will appreciate any help.
Thanks
FileHandle = FreeFile()
Open strFileName For Output As FileHandle
On Error GoTo Err_handler
Dim rs As Recordset
' Set rs = Recordset
Set rs = Me.RecordsetClone
rs.MoveFirst
Do Until rs.EOF
nCountLines = 4
AddedExpre1 = Expre1
strLine = Left(Mid((" " + Company), 2) & Space(60), 60)
Print #FileHandle, strLine
strLine = Left(Mid((" " + Fname) & (" " + LName), 2) & Space(60), 60)
Print #FileHandle, strLine
rs.MoveNext
Loop
Close #FileHandle