Home > Archive > MS Access Database with External Data > September 2005 > Exporting Excel information into Access









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Exporting Excel information into Access
accessnovice

2005-09-29, 8:25 pm

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

2005-09-29, 8:25 pm

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.

"accessnovice" wrote:

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

accessnovice

2005-09-29, 8:25 pm

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.

"Klatuu" wrote:
[color=darkred]
> 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.
>
> "accessnovice" wrote:
>
Klatuu

2005-09-29, 8:25 pm

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.

"accessnovice" wrote:
[color=darkred]
> 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.
>
> "Klatuu" wrote:
>
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com