Export Specification

ions

Access User
Local time
Today, 00:15
Joined
May 23, 2004
Messages
823
Dear VBA Expert.

I am running the following code....

Code:
DoCmd.TransferText acExportDelim, "ShawDrum Export Specification", "ShawDrum", "C:\Documents and Settings\Peter\Desktop\Shaw.txt"

The problem is that the SAVE Export specification doesn't save the fact that I want the first row to contain the field headers. I select this option in the Export Wizard... save the specification and run the above code. Despite this the exported text file doesn't include the field headings.

When I re-open the export specification the Include Row Headers option is not selected. How can I include the row Heading in the exported file using the Export specification.

Thanks so much!!!
 
You need to add another parameter to the TransferText to include the column headings. Adding ,TRUE after the export filename will add the header row.


Code:
DoCmd.TransferText acExportDelim, "ShawDrum Export Specification", "ShawDrum", "C:\Documents and Settings\Peter\Desktop\Shaw.txt",TRUE
 
Thank you Sir.

Excellent worked.
 

Users who are viewing this thread

Back
Top Bottom