Share via

Autonumber/Linking table

Anonymous
2010-11-29T03:03:59+00:00

I have three tables (FamilyInfo, FamilyMemberInfo, and PhoneInfo). In each of these tables I used autonumber as the primary key. Then I tried to make a linking table with the 3 primary keys from those tables with each primary key as autonumber. I got the message that a table can only have one auto number field. I thought that the fields in the linking table had to be of the same domain as the foreign key in the referenced table. So does that mean that I have to make the ID fields in the main tables as text?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-11-29T03:10:23+00:00

"Serendipityww" wrote in message

news:*** Email address is removed for privacy ***...

>I have three tables (FamilyInfo, FamilyMemberInfo, and PhoneInfo). In each

>of these tables I used autonumber as the primary key. Then I tried to make

>a linking table with the 3 primary keys from those tables with each primary

>key as autonumber. I got the message that a table can only have one auto

>number field. I thought that the fields in the linking table had to be of

>the same domain as the foreign key in the referenced table. So does that

>mean that I have to make the ID fields in the main tables as text?

..

An autonumber is really Long Integer with other special attributes.  In your

linking table, you won't be auto-incrementing the foreign key values from

the other tables, so those foreign key fields should be defined as Long

Integer.

When you do that, by the way, make sure those fields in the linking tale

don't have their Default Value properties set to 0.  They should have no

default values.


Dirk Goldgar, MS Access MVP

Access tips: www.datagnostics.com/tips.html

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful