Transfertext for importing text files without need for a specification

  • Thread starter Thread starter Karen Middleton
  • Start date Start date
K

Karen Middleton

Hello All

I am using the following macro to import any csv file into any
existing table in Access.

Function ImportTable(tablename As String, filename As String)
DoCmd.TransferText acImportDelim, "CSVEXPORT", tablename, filename
End Function



But the TransferText seems to need a Specification name which is
CSVEXPORT I created but specifications are specific to a particular
table can somebody please suggest to me how I can create a generic
specification that can import a given csv file into a any table
needed. I do not want to build one specification for each table.

Please advise how I can do this.

Thanks in advance
Karen
 
Specification names are not specific to a particular table
but the table structure must have all the field names
referenced in the specification and the file structure must
also be the same.

Chris
 
Back
Top