I posted my sub routine and sql below. I used the caption property in my alias query to set headings.
SELECT test.Field1, test.Field2, test.Field3, test.Field4, test.Field5, test.Field6, test.Field7, test.Field8, test.Field9, test.Field10, test.Field11, test.Field12, test.Field13, test.Field14, test.Field15, test.Field16, test.Field17, test.Field18, test.Field19, test.Field20, test.Field21, test.Field22, test.Field23, test.Field24, test.Field25, test.Field26, test.Field27
FROM test;
_______________________________________________
Private Sub Command161_Click()
Dim strFilter As String
Dim strSaveFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xls)", "*.xls")
strSaveFileName = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
'here you would probaly want your Transfertext code
'for example
DoCmd.TransferSpreadsheet acExport, 8, "test (dump) Without Matching after", strSaveFileName, True, ""
MsgBox "Your data has been saved", vbOKOnly
End Sub