import field names from fixed width text

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
 
A

Allen Browne

Try something like this:
DoCmd.TransferText acImportDelim,,"Table1", "C:\MyFile.txt", True
 
J

John Nurick

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top