Link to home
Start Free TrialLog in
Avatar of epicazo
epicazoFlag for United States of America

asked on

How to Programatically export comma delimted to CSV

I tried to programatically export to a CSV file, comma delimted, but the following didn't produce the results I expected.  The DoCmd I am using below doesn't export as comma delimted.

DoCmd.OutputTo acOutputTable, "tbl Export Current Charges", acFormatCSV, "C:\Siemens\Xport_HistoryData\20100831\ELA\MYTEST_CHARGES.CSV"

I have about 10 tables that are exported weekly and the varDateFolder changes weekly (It will always be the prior sunday in YYYYMMDD format.

DoCmd.OutputTo acOutputTable, "tbl Export Current Charges", acFormatCSV, "C:\Siemens\Xport_HistoryData\"+varDateFolder+"\Group1\MY_CHARGES.CSV"
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of epicazo

ASKER

sorry for the delay  --   thanks!
Avatar of epicazo

ASKER

Capricorn,

I gave you the points without testing.    I am now trying to implement and I get the following error:

The export file does not exist....

DoCmd.TransferText acExportDelim, "Export_CHP_ToRadBillingSFTP", "X_RadBilling", "F:\RadAdvocate\RAD_Billing_CHPYYYYMMDD.CSV", True
Avatar of epicazo

ASKER

Here is the error....

RUN-TIME ERROR '3625'
"THE TEXT FILE SPECIFICATION 'EXPORT_CHP_TORADBILLINGSFTP' DOES NOT EXIST...."
so, the error message says it don't exists.. did you create any export specification?