auto number primary key

  • Thread starter Thread starter Souris
  • Start date Start date
S

Souris

I have an auto number field in my table for primary key.
It does not let me to create relationship when I have auto number field.

Should I use long integer instead or I have something wrong?

Your information is great appreicated,
 
If you only have one table, there may not be any "relationship".

If you have two tables related one-to-many, you could use the Autonumber
primary key of the "one" side table, and you'd need to add a LongInt field
(in addition to any primary key) in the "many" side table to hold the ID of
that record's "parent" from your first table.

You'd related the Primary key of the "one" table to the foreign key of the
"many" table.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks for the message,

I have the relationship after I change the data type.

I got conversion error when I import data from other table?
Can I import data in to a table with auto number primary key?

If not then should I change the auto number as long integer then it lost the
auto number functions.

Can you please advuse?

Your information is great appreciated,
 
I don't know if the import will work but I do know that linking to the old
table and using an append query to copy data from the old table to the new
table does work. You will only have trouble if the primary keys that you
are appending duplicate that of an existing record.
 
Thanks for the message,
It works,



Souris said:
Thanks for the message,

I have the relationship after I change the data type.

I got conversion error when I import data from other table?
Can I import data in to a table with auto number primary key?

If not then should I change the auto number as long integer then it lost the
auto number functions.

Can you please advuse?

Your information is great appreciated,
 
Back
Top