Exporting

mlr0911

Registered User.
Local time
Yesterday, 20:14
Joined
Oct 27, 2006
Messages
155
Hello All,

I have 2 reports that are exporting to 2 different .txt files. Currenlty, I am using the transfertext function in access. What is the best way to combine these 2 reports into one .txt file? I have 2 different specification criteria being used, but I need all the data in 1 report.

Thanks in advance,

mlr0911
 
it is possible to concatenate or append files in DOS.
or you could open each file using the OPEN # Statement and write the contents to one file.
 
Great idea! Thanks.
 
I have tried using the Open method but I am not able to export anything. Am I supposed to use the transfertext method in addition to the Open method?

I am stumped at this point because I want to combine the 2 Specification names for my fixed width text files so that they will be one file.

Thanks mlr0911
 
the OPEN statement Is not the same as the open method and is used to open and read text files, searCh help for OPEN #, LINE INPUT, PRINT # , WRITE #
 
I have the following code that is working fine, in the immediate window. How can I get this infomation (copy) into my other text document. Here is the code I have thus far.

Dim TextLine
Dim PRI As String
Dim PRD As String



PRI = "\\wil-tdv01\trp\ma\Privacy.txt"
PRD = "\\wil-tdv01\trp\mar\privacy_Domestic.txt"

Open PRI For Input As #1 ' Open file.


Do While Not EOF(1) ' Loop until end of file.
Line Input #1, TextLine ' Read line into variable.

'Debug.Print TextLine ' Print to the Immediate window.


Loop

Open PRD For Input As #2

??????????????Not sure how to tell Input#1 to paste in Input#2


Close #1
Close #2
 
open a file for output, this will contain the contents of both files and to write use the WRITE # statement.

or you could open the first file in append mode and write file two to the first.
 
Thanks Dennisk, I was able to use the append method that you suggested and kill sheet 2.

Thanks alot for your help!
 

Users who are viewing this thread

Back
Top Bottom