Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Access 2003 Report to Text File Using VBA

Status
Not open for further replies.

ChiSoxFan

Programmer
Aug 30, 2005
4
US
I'm new to using VBA for Access 2003 and need some help.

I'm currently creating a text file (test.txt) and using the Print command to add "header" information.

Once that is complete, I need to append a report (rptTest) to the existing text file (test.txt).

I've tried: DoCmd.OutputTo acOutputReport, rptTest, acFormatTXT, test.txt

However, this overwrites all the "header" information.

Please let me know what I'm doing wrong.

Thanks,
ChiSoxFan
 
You will have to output the report to a second file and then use, say, the FileSystemObject to read the report into the header file.
 
Figured this out.

Thanks Remou for the help.

ChiSoxFan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top