Hi, Paul.
I would like to change the default export format from Comma delimited, No
Headers, and quotes to Tab Delimited, Headers and No Quotes.
To alter these defaults, one may use an export specification, the Export
Text Wizard, or a Make-Table SQL query with a schema.ini file in the
destination directory. In each case, you'll either need to make preparations
beforehand (such as an export specification), or step through the Export Text
Wizard (which allows the saving of the settings as an export specification
for future use).
If you created an export specification with "Delimited," "Tab" delimiter,
"Include field names on first row," and Text Qualifier: {None} settings, then
you could use it with the following VBA syntax:
DoCmd.TransferText acExportDelim, "MyExportSpec", "qryStuff",
"C:\Output.txt", True
If you created a Schema.ini file for the destination directory, then the
syntax would look like this:
[OutputFile.txt]
ColNameHeader=True
Format=TabDelimited
TextDelimiter="None"
CharacterSet=OEM
Col1=ID Long
Col2=Stuff Char Width 20
Col3=MoreStuff Char Width 35
Col4=SomeDate Date
And the SQL in the Make-Table query would look like this:
SELECT * INTO [TEXT;HDR=TRUE;DATABASE=C:\].Output.txt
FROM qryStuff;
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
Paul Hammond said:
I would like to change the default export format from Comma delimited, No
Headers, and quotes to Tab Delimited, Headers and No Quotes.
Any ideas?
TIA,
Paul Hammond
Richmond, VA