Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output to *.csv using macro or VB in MS Access 2000

Status
Not open for further replies.

JackeyCat

Technical User
Apr 13, 2001
13
0
0
US
In MS Access 2000, I am trying to automate the export of a table into a comma-delimited file (.csv). When I have the table open, I can export to that format no problem, but when I try to export in a macro using the 'Output To' command, the file-output format choices are limited. What I'm thinking is that I could somehow modify the VB code to be able to accomplish what I want, but I'm not sure how to designate a csv as the output format in code. I thought the below might be a way to do it, but no dice.

DoCmd.OutputTo acTable, "HierarchyOutput","Comma-Delimited File", "C:\test.csv", False, ""


Does anyone have any ideas?? I'd appreciate any advice!! Thanks again for all the help all the time!

 

Have you tried using the TransferText method rather than OutputTo? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thank you -- I've always skipped right over that -- it looks perfect. Thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top