export csv file from ms access 2013 with vba

hi

i use this method to export to csv
DoCmd.TransferText acExportDelim, , "TempAccountTrackerT", "C:\mydocument\myfile.csv"

Open in new window


but all fields has  quotes how can i export the data with vba without quotes?

thanks a lot
bill201Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robert ShermanOwnerCommented:
The best approach is probably to create an export specification.  

If you look at this page (search for "Save the specification and review the text file" to get right to it)

https://support.office.com/en-sg/article/Export-data-to-a-text-file-f72dfc38-a8a0-4c5b-8c2c-bf2950814140

It explains how to use the export wizard to save a specification.   While you're going through the steps in the wizard, you can specify the character to use to qualify text fields.  I think that's what you're looking for.  

Once you've gotten the output to your liking using the export wizard, and save to an export specification, then you can tell the TransferText method to use your saved specification:

 .TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage)

So, in your case

DoCmd.TransferText acExportDelim, INSERTSPECNAMEHERE, , "TempAccountTrackerT", "C:\mydocument\myfile.csv"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bill201Author Commented:
your ideo is excellent but the codeis not compiled, so There is probably some small mistake on the code that you write how export a save export specification.
0
Robert ShermanOwnerCommented:
EDIT: I see what I did now, forgot to remove the parameter space when I added the placeholder..  this should work:

DoCmd.TransferText acExportDelim, "MySavedExport", "TempAccountTrackerT", "C:\mydocument\myfile.csv"
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

bill201Author Commented:
sorry but it's also not working (i have acess 2013)
0
bill201Author Commented:
ok i found the code DoCmd.RunSavedImportExport, any way thank a lot for your excellent idea
0
bill201Author Commented:
Robert Sherman solution is excellent but the code dosn't work so i put another code
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.