Exporting Table to Text file including Field names

A

AShi

When i am using following

DoCmd.TransferText acExportFixed, strExportSpec, strTable,
"\\Enterprise\mlhsapps\ExportTest.txt", True fieldnames are seperated by
comma istead of fixex width

Can some one help me with this
 
A

AShi

when i export to delimitted - some how it adds time to date. I am sure I
don't have tlme in export specs
 
A

AShi

Private Sub cmdExport_Click()

Dim strTable, strPath, strLine, strTemp As String
Dim X As Integer
Dim BlkRow As Integer
Dim strSQL As String
Dim strExportSpec As String
Dim fs, f
Dim fso, myfile, objTxt As Object

strTable = FirstSelected

Select Case Left(strTable, 5)
Case Is = "A2DEV"
strExportSpec = "A2DEV3_ExportSpec1"
Case Is = "A2DV1"
strExportSpec = "A2DEV3_ExportSpec"

End Select

'Export to temporary text file
DoCmd.TransferText acExporText, strExportSpec, strTable,
"\\Enterprise\mlhsapps\ExportTest.txt", True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top