Re: Change field names to first row of table



"Bob" <scrawford@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote

I've got a table that I've imported and it has
junk at the top of the table, so after import
I run a delete query to remove the junk lines
then I'm left with the field names I want for
the table at the top of the table but the field
names currently are 'field1' etc, so how do I
rename the field names to the fields on the
top row of the table.

If the column names were all in the first row, you could specify that in the
Import Wizard, and not have to do any post-processing. It is a little
unusual for the Column Headings to be split over two rows, but you could
write VBA code to do what you want, after you have imported the information
into a table; or, perhaps, depending on the format of the data that is being
imported, before or as you import it.

Larry Linson
Microsoft Access MVP


.



Relevant Pages

  • Re: Exporting wizard truncates value
    ... bunch of junk in it I do not need. ... >Create a query that uses calculated fields to format the ... >Then export the query. ...
    (microsoft.public.access.externaldata)
  • Re: Having a Row Appear as the First Row on Every Page
    ... PageSetup in PrintPreview.) ... George Nicholson ... Remove 'Junk' from return address. ... > of the column headings in it. ...
    (microsoft.public.excel.misc)
  • Re: Samba and text files
    ... and the "junk" is the RMS record delimiters. ... I'm doing this for VMS ... Older MOAos expected CR-delimited (STream_CR in VMSland). ... convert all files to "Stream" format. ...
    (comp.os.vms)
  • Re: Samba and text files
    ... and the "junk" is the RMS record delimiters. ... I'm doing this for VMS ... convert all files to "Stream" format. ...
    (comp.os.vms)
  • Re: Samba and text files
    ... bypassing RMS, and the "junk" is the RMS record delimiters. ... convert all files to "Stream" format. ... The format for Samba usable files is Variable Stream. ...
    (comp.os.vms)