Transfertext- error number 3010

G

Guest

I have a command button that transfers the contents of a table to a
delimitred text file:

DoCmd.TransferText acExportDelim, "specJan", "tblExtrUnits", strPath &
strPeriod & "-ESPCos" & ".csv", False

But when the file exists, i receive the error message number 3010: "Table
'F0 2006-ESPRevenue.csv' already exists"

In the Transfertext method, I dont see a switch available to "overwrite" the
existing file. I could delete it, prior to the transfertext method, I dont
know how to do this. Help! :)
 
R

Ron Weiner

Have yo looked at the, ahem... Kill command to delete a file?

Kill strPath & strPeriod & "-ESPCos.csv"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top