Code to export text without quotes (1 Viewer)

Talismanic

Registered User.
Local time
Today, 16:31
Joined
May 25, 2000
Messages
377
I am trying to automate the process of exporting a database to a comma delimited txt file but I can not find a way to remove the quotes Access insists on putting around the fields. Any body know of a way?

DoCmd.TransferText acExportDelim, , "BidtekRejoinReport", _
"C:\DatabaseText.txt", False
 

AlanS

Registered User.
Local time
Today, 11:31
Joined
Mar 23, 2001
Messages
292
You need to set up an export specification, and then reference it as the second argument to the DoCmd.TransferText method.

Select or open the table you wish to export, choose SaveAs/Export from the File menu, select "To an External File or Database" and click OK. Change the SaveAsType to "Text Files" and, if necessary, change the file name and/or location. Click the Export button to fire up the Export Text Wizard. On the wizard's first screen, click the Advanced button, change the TextQualifier from [quotation mark] to "{None}", click the SaveAs button, change the specification name if necessary, and click OK to save it. Then click Cancel twice to abort the process. You can now use this specification as an argument to the DoCmd.TransferText method.
 

Talismanic

Registered User.
Local time
Today, 16:31
Joined
May 25, 2000
Messages
377
Thanks, AlanS!

I must of missed a step or am not referencing it right. This is what I have:

DoCmd.TransferText acExportDelim, BidtekExport, "BidtekRejoinReport", _
"C:\Bidtek.txt", False

What am I doing wrong?
 

Talismanic

Registered User.
Local time
Today, 16:31
Joined
May 25, 2000
Messages
377
I have it now, I forgot to put quotes around the specification name. Thanks again!
 

Users who are viewing this thread

Top Bottom