By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,734 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

Export Query to CSV File

P: n/a
Running Access 2k

I run the following in an event code to generate a report in an excel format.
What I wish to do is to have to output as a csv file (comma delimited).

Know this is pretty basic, but to proper syntax is avoiding me.

Any help appreciated. Thanks in advance

DoCmd.OutputTo acQuery, "qryMyQuery", "MicrosoftExcel(*.xls)",
"C:\Misc\MyOutput.xls", False, ""

"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lookup TransferText in the helpfile.

Here is a quick sample line of code:
DoCmd.TransferText TransferType:=acExportDelim, _
TableName:="FormTabOrders", _
FileName:="c:\test.csv"

HTH

--
Jeffrey R. Bailey
"Clint Stowers" <cl*******@aol.comNoSpam> wrote in message
news:20***************************@mb-m10.aol.com...
Running Access 2k

I run the following in an event code to generate a report in an excel format. What I wish to do is to have to output as a csv file (comma delimited).

Know this is pretty basic, but to proper syntax is avoiding me.

Any help appreciated. Thanks in advance

DoCmd.OutputTo acQuery, "qryMyQuery", "MicrosoftExcel(*.xls)",
"C:\Misc\MyOutput.xls", False, ""

"And.... Exactly at which point did you consider this a good idea?"

Nov 12 '05 #2

P: n/a
In article <Ri********************@twister.tampabay.rr.com> , "Jeffrey R.
Bailey" <mr**********@yahoo.com> writes:
DoCmd.TransferText TransferType:=acExportDelim,


Thanks.... I was missing the acExportDelim
All is now well.



"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.