DoCmd.TransferText acExportDelimited

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Show us your code for this step. My first guess is that you have reversed
the placement of some arguments for the TransferText method.
 
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"
 
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.
 
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.
 
Back
Top