import field names from fixed width text

  • Thread starter Thread starter Oliver
  • Start date Start date
O

Oliver

Hi all. Using Access 2000. Trying to import fixed width file that has
column headings that I want to becom field names - it's not an option :(
Is there a way to achieve this?
Thanks
Oliver
 
Try something like this:
DoCmd.TransferText acImportDelim,,"Table1", "C:\MyFile.txt", True
 
Hi all. Using Access 2000. Trying to import fixed width file that has
column headings that I want to becom field names - it's not an option :(
Is there a way to achieve this?

It's not an option in the standard fixed-width import routine. You'd
need to write code to read and parse the first line of the file.

But ISTM that this must be a pretty unusual situation. You can't import
a fixed-width file without separately providing field names, types and
sizes (otherwise the import routine doesn't know where the fields end
and begin), so if you just want to read the field names from the first
line of the file you presumably already have a specification that
matches the file except for having the wrong field names.
 
Back
Top