Problem Characters in Importing a Text/ CSV File

  • Thread starter Thread starter Bob Barnes
  • Start date Start date
B

Bob Barnes

These characters "embedded" in a standard CSV structure...
.....commas, apostrophes, double-quotes, carriage return/ linefeed...
will cause problems when running code such as..

Line Input #iNumOne, vTheFile
...............

Are there any other characters to cause similar problems?

TIA - Bob
 
Bob Barnes said:
These characters "embedded" in a standard CSV structure...
....commas, apostrophes, double-quotes, carriage return/ linefeed...
will cause problems when running code such as..

Line Input #iNumOne, vTheFile
...............

Are there any other characters to cause similar problems?


Actually, of the characters you mentioned, only the carriage return/line
feed combination would cause a problem to the Line Input statement, because
CR/LF marks the end of a line. Commas, apostrophes, and quotes will make no
difference for that statement.

They may well have an effect on a delimited-text file import, or in other
code where Access is trying to parse the line into fields. In the case of
an import made via DoCmd.TransferText, you can use an import-output
specification to get control over the handling of those characters.
 
Back
Top