DoCmd.TransferText acExportDelimited

R

Randy

In a module I have a do command to transfer a table to a tab seperated text
file. I get the message 'Run-time error 31519 You cannot import this file.'
Do you have any ideas about what I'm doing wrong.
 
K

Ken Snell [MVP]

Show us your code for this step. My first guess is that you have reversed
the placement of some arguments for the TransferText method.
 
R

Randy

Ken, This is the transfer statement. Thanks for your help

stDocName = "tblTPC_Inventory_Hosting_Export"
DoCmd.TransferText acExportDelimited, tblTPC_Inventory_Hosting_Tab, _
stDocName, _

"c:\MyExcelDownload\TPC_Inventory_Hosting_Export.ivh"
 
K

Ken Snell [MVP]

And the "export specification" argument has been omitted in the list of
arguments. It is the second argument in the list; it can be left "blank" if
you're not using a spec:

DoCmd.TransferText acExportDelimited, "NameOfSpecification",
tblTPC_Inventory_Hosting_Tab, etc.

or

DoCmd.TransferText acExportDelimited, , tblTPC_Inventory_Hosting_Tab, etc.
 
R

Randy

It worked. Thanks for your help.

Ken Snell said:
And the "export specification" argument has been omitted in the list of
arguments. It is the second argument in the list; it can be left "blank" if
you're not using a spec:

DoCmd.TransferText acExportDelimited, "NameOfSpecification",
tblTPC_Inventory_Hosting_Tab, etc.

or

DoCmd.TransferText acExportDelimited, , tblTPC_Inventory_Hosting_Tab, etc.
 

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