Code looks a little wonky.....
This is my code for working with text files
Code:
' open read text file
RF = FreeFile
Open FileToRead For Input As #RF
' open write text file
WF = FreeFile
FileToWrite = CurrentProject.Path & "\FundTransfer_" & Format(dPayment, "yyyy-mm-dd") & ".txt"
Open FileToWrite For Output As #WF
Print #WF, "END_PK, Division, EmpID, SSN, LName, FName, MI, Amount, Transfer_Date, Comment"
Do Until EOF(RF) ' <<-- NOT 1
Line Input #RF, TextLine ' Read line into variable. ' <<-- NOT 1
' the magic happens here!!
Loop
Close #RF
Close #WF
You are using 1 instead of "intFile"
If you use 1, you are hard coding the file handle number and not using the value from FreeFile.