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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transfer text to csv file in ADP

Status
Not open for further replies.

jordanking

Programmer
Sep 8, 2005
351
Hello,

I had a funtion that worked perfectly in an access databse but does not work in an access project. My access project is Access 2007 with a Sql server 2005 backend.

I need to export one table to a csv file with no quotes around text fields. In .mdb files you can use the export wizard and save your settings in a specifidcation file and it works great, but in a .apd file the specification fiel can not be saved because the tables reside within sql server. As a result I have double quotes around all the text fields and I need to avoid this. I am wondering if anyone has experience with .adp files and this process?

Code:
DoCmd.TransferText acExportDelim, , "MonerisBatch", "R:\Accounting\CCBatch\Current\MonerisBatch.csv", False

This works and returns a fiel with quotes

Code:
    DoCmd.TransferText acExportDelim, "Export-MonerisBatch", "MonerisBatch", "R:\Accounting\CCBatch\Current\MonerisBatch.csv", False
but if I use the export wizards and save a specification file called "MonerisBatch", the following error occurs:

Run time error 3625

the text file specification 'Export-MonerisBatch' does not exist.
You cannot import, export, or link using the specification.

But if I go under the "external data" menu in, access 2007, and open the saved exports, there is a Export-MonerisBatch that exists and can be run with success, just not from VBA code

.....
I'd rather be surfing
 
sorry, I just found the answer

Code:
DoCmd.RunSavedImportExport "Export-MonerisBatch"

.....
I'd rather be surfing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top