TransferText using wrong format

Apr 15, 2011
Reaction score

I am trying to programmatically export an access query as a tab-delimited text. I created a saved export called SMSUpload2 that successfully creates the file in the correct formatting, which I set using the Advanced button inside the Export Text Wizard.The problem occurs when I use DoCmd.TransferText method with that saved export as the SpecificationName - this outputs a file that is comma-delimited.

DoCmd.TransferText acExportDelim, SMSUpload2, _ "qry_Facilitation_Attributed_SMS_Upload", _
"C:\Documents and Settings\rmurray\My Documents\SMSUpload.txt", -1

Running the saved export manually still provides the correct output.

Incidentally, it does work if I export as a CSV file but then my formatting gets messed up (date formats change from yyyy/mm/dd to mm/dd/yyyy, etc), just as it would if I manually exported to a CSV.

Any thoughts? Thanks!



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