Hello,
I am trying to export a table generated by a query. I am using the following line of code to output to a file.
DoCmd.TransferText acExportDelim, , MyTbl, "C:\whatever\" & ExportName & ".txt"
This will generate a comma delimited text file with the results. What I would like to do is on the first line specify the field names for the table. So if the field names were "Last Name", "First Name", "Telephone Number" then the text file would look like this:
Last Name, First Name, Telephone Number
"Anderson", "Carl" 222-2222
"Smith", "John", 555-5555
"Zane", "Max", 444-4444
How would I go about doing this? I've tried looking stuff up on the web but I can't seem to find anything.
I am trying to export a table generated by a query. I am using the following line of code to output to a file.
DoCmd.TransferText acExportDelim, , MyTbl, "C:\whatever\" & ExportName & ".txt"
This will generate a comma delimited text file with the results. What I would like to do is on the first line specify the field names for the table. So if the field names were "Last Name", "First Name", "Telephone Number" then the text file would look like this:
Last Name, First Name, Telephone Number
"Anderson", "Carl" 222-2222
"Smith", "John", 555-5555
"Zane", "Max", 444-4444
How would I go about doing this? I've tried looking stuff up on the web but I can't seem to find anything.