Exporting Excel information into Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an excel spreadsheet that I need to export into Access. I have tried 2
different ways and keep getting the same error message. I have tried to
import into an existing table set up exactly like the excel spreadsheet and
have also tried to import into a new table. I keep getting the same error
message no matter how I try to do it. The message is as follows:Error
creating primary key on field 'field1'(the changes you requested to the table
were not successful because they would create duplicate values in the index,
primary key, or relationship. Change the data in the field or fields that
contain duplicate data, remove teh index, or redefine the index to permit
duplicate entries and try again.
 
If you are importing into a new table, the import wizard asks if you want to
define a primary key. The correct answer is No.
If you are importing into an existing table, be sure there is no primary key
defined and that the field you are having problems with allows duplicates.
 
I think I have that settled, thanks. New question - when I imported the
information it was in alpha order and now it is all mishmash. When I go into
design view to change the primary key so that I can have the customer list in
alpha order it won't let me change and I get the same error message as below.
 
That is because there are duplicate values in the field you are trying to set
as a primary key. Is is not absolutely necessary for them to be in any
specific order in the table. If you need to see them in sorted order, you
can control that with your form, or query, or however you want to view them.
 
Back
Top