0
votes

The following line should import a semi-colon ; delimited .csv text file to a table.

DoCmd.TransferText TransferType:=acImportDelim, SpecificationName:=specNote, TableName:="tblImport", FileName:="K:\path\file.csv" 

However this puts all the fields in one field.

What is going wrong here?

Any suggestions?

I specified

  • File format: Delimited
  • Field delimiter: ;

I set this through the import wizard and saved this specification. With the wizard all went good.

I want to share the specification but I dont know how to do that?

Many thanks.

1
Share the import specification. That's where it's specified if your file is semicolon-delimited or comma-delimited. - Erik A
It's semicolon-delimited - Rudi Bloes
And where have you specified that in the import specification? As said, share the import specification. - Erik A

1 Answers

1
votes

Is specNote a variable or the name of your specification?

If the latter, try:

DoCmd.TransferText _
TransferType:=acImportDelim, _
SpecificationName:="specNote", _
TableName:="tblImport", _
FileName:="K:\path\file.csv"