Building on (and agreeing with) what RuralGuy said, there are two methods. I use the 'old school' method; here is a snipped of code:
Code:
' open error text file - output
EF = FreeFile
FileToWrite = CurrentProject.Path & "\ERRORS_" & BaseName & " - ImportHours" & ".txt"
Me.txtErrFile = FileToWrite
Open FileToWrite For Output As #EF
This opens a text file for output. The code to open a text file for input is a little different.
The second method is using the "FileSystemObject". I am starting to transition to it.
Here are some links to help you get started.
Main page : http://www.wiseowl.co.uk/blog/s211/textstream.htm
First page : http://www.wiseowl.co.uk/blog/s210/filesystemobject.htm
Second page : http://www.wiseowl.co.uk/blog/s211/writeline.htm
Third page : http://www.wiseowl.co.uk/blog/s211/readline.htm
If you get stuck or have questions, post back...