Adding text To An Existing Text file................

M

MRL

Back again..............
Using the Print command idea from Doug I was able to export one set of
numbers:

Dim intFile As Integer
Dim strFile As String

strFile = "C:\MyOutput.txt"
intFile = FreeFile()
Open strFile For Ouput As #intFile
Print #intFile, "Problem at " & Format(Now(), "yyyy-mm-dd hh:nn:ss")
Print #intFile, "Part Number = " & Me.txtPartNumber
Print #intFile, "Operation Number = " & Me.txtOperationNumber
Print #intFile
Close #intFile
How do I continue to add more unsuccessful query part & operation numbers to
this same text file? Do I loop it, can I ask it to say active? Something
simple?
Thanks, Mike
 
J

John Nurick

Hi Mike,

Just open the file For Append.

Back again..............
Using the Print command idea from Doug I was able to export one set of
numbers:

Dim intFile As Integer
Dim strFile As String

strFile = "C:\MyOutput.txt"
intFile = FreeFile()
Open strFile For Ouput As #intFile
Print #intFile, "Problem at " & Format(Now(), "yyyy-mm-dd hh:nn:ss")
Print #intFile, "Part Number = " & Me.txtPartNumber
Print #intFile, "Operation Number = " & Me.txtOperationNumber
Print #intFile
Close #intFile
How do I continue to add more unsuccessful query part & operation numbers to
this same text file? Do I loop it, can I ask it to say active? Something
simple?
Thanks, Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top