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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Header & Footers to files

Status
Not open for further replies.

AFKAFB

Programmer
Joined
Aug 22, 2005
Messages
26
Location
US
Hi

I've a number of access queries that I need to save as pipe delimited text files.

That part is okay.

But now the recipients require the files to have a header and footer as follows :

The header will read say
"P|QWERTY|dd/mm/yyyy|dd/mm/yyyy|

and the footer will read
"G|1000"

I guess I’ll have to first save the file as txt, and then run a procedure/macro that will open the file and insert the code.

To clarify I’ll have already created the six files as txt files with names say fileA, fileB etc.

How do I do this please?

Regards
Chris

 
Two possible solutions that might be worth trying:

Run a Union Query to add two extra records to the result set.

Use the Windows Scripting Host to manipulate the text files.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top