First Row as Field Names

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.
 
D

Douglas J Steele

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.
 
A

Arslan

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.
 
S

SusanV

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)
 
A

Arslan

Thanks SusanV,
Your suggestion will definitely save time since I download this data
every week, just like you said.
- Arslan
 
S

SusanV

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
 

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