HELP with using a schema.ini to export

T

TL

I am having a problem exporting a table from SQL to a text using a
custom delimiter. When using a default of csv everything works fine. Below
please see some of the code I am using and below that is the schema file. I
am a little confused because I never want the file name to be the same so I
am not sure what to put in the first line of the schema.


Dim Identity As Variant 'is the date time format
Dim Location As String ' this is the result file
'Dim Location2 As String 'this is the schema file
Dim Extension As String
Dim Identity1 As String 'file name plus extension

Extension = ".txt"
'Identity = Format(Now(), "ddmmyyyy")
Identity = Format(Now(), "mmddyyyyhhnnss")
Identity1 = Identity & Extension
Location = "C:\Program Files\Files\Prr110_results_" & Identity1
Location2 = "C:\Program Files\Files\schema.ini"

DoCmd.Hourglass (False)



DoCmd.TransferText acExportDelim, Location2, _
"dbo." & Tablename, Location, False
 

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