Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

First Row as Field Names

Discussion in 'Information Technology' started by Arslan, Nov 8, 2005.

  1. Arslan

    Arslan
    Expand Collapse
    Guest

    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.
     
  2. Loading...


  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Arslan" <farslan@gmail.com> wrote in message
    news:1131393241.461296.172210@f14g2000cwb.googlegroups.com...
    > 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.
    >
     
  4. Arslan

    Arslan
    Expand Collapse
    Guest

    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.
     
  5. SusanV

    SusanV
    Expand Collapse
    Guest

    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)
    --
    hth,
    SusanV


    "Arslan" <farslan@gmail.com> wrote in message
    news:1131395227.176219.234520@g47g2000cwa.googlegroups.com...
    > 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.
    >
     
  6. Arslan

    Arslan
    Expand Collapse
    Guest

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

    SusanV
    Expand Collapse
    Guest

    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

    "Arslan" <farslan@gmail.com> wrote in message
    news:1131400245.893404.207140@g43g2000cwa.googlegroups.com...
    > Thanks SusanV,
    > Your suggestion will definitely save time since I download this data
    > every week, just like you said.
    > - Arslan
    >
     

Share This Page