Import and autonumbers

  • Thread starter Thread starter Hanne
  • Start date Start date
H

Hanne

Is it possible to import data from Excel to an Access
table with primary key as autonumber?
 
Yes, it is.
Set up the table with the proper fields, and the
Autonumber Primary field and then import the Excel data in.

Good Luck!
 
But I need to have one column in the Excel sheet for each
field in the table? Right? Do I then leave the column for
the primary key empty? I've tried that, but without
success :(
 
Yes, there has to be a field in the table for each column
in the Excel spreadsheet. Call the fields in the Table
the same as the names of the columns. Also! Include a
field that you set as the Autonumber field, name it
whatever you want. When you import the Primary Autonumber
field will automatically populate with the autonumber for
each record.
I tried this in Access 2000 and it worked quite
successfully.

Good Luck!
 
I should clarify.....
The AUTONUMBER FIELD IS ONLY SET UP IN ACCESS, NOT IN THE
EXCEL SHEET.
So add the Autonumber field to the Table, and no
corresponding field in the Excel sheet that is being
imported.
 
Back
Top