First Row as Field Names

  • Thread starter Thread starter Arslan
  • Start date Start date
A

Arslan

I am trying to replace the field names with data in first row. The
import utility has a check box to accomplish this but I can not see
anything that lets you perform this after data is already imported.
Any ideas?
Thanks.
 
You can't.

If you didn't select the checkbox when you imported, either delete the table
and reimport, or write code to retrieve the first row of the table, rename
the fields and delete the first row.
 
If the import file is "fixed width", not "delimited", you do not get
the option to select the first row as field names. This is the main
reason why I am trying to find a way around this. When I select
Delimited and adjust the field sizes then check the box to use the
first row as field names, access does not like what it sees in that row
and eliminates the row completely, giving me the default field names
instead.
I am downloading text files from a site and do not have control over
the format of the output they create.
Thanks for the response though.
 
Hi Arslan,

Don't know if this applies, but you could create a table with the correct
field names then import the data to that table. Then for future imports you
can clear the table then reimport to it. (I have a similar situation, and
this is how I solved it, every week I re-import fresh data)
 
Thanks SusanV,
Your suggestion will definitely save time since I download this data
every week, just like you said.
- Arslan
 
Glad to help Arslan - you can save yourself even more time by coding it to a
button or something in VB - first clear the table with delete * from table,
then transfertext to the table.

SusanV
 
Back
Top