Unable to create foreign key

Arvin

I'm liv'in the dream ....
Local time
Yesterday, 22:00
Joined
Jul 22, 2008
Messages
192
Hello,

I am having some difficulty with creating a foreign key in one of my tables. The two tables i want to relate are ServiceMatrixtbl and ServiceMatrixDetailstbl.

I would like the foreign key to be in my ServiceMatrixDetailstbl.

I am ...somewhat comfortable with Access .... but I'm not a expert :)


I have attached the DB for your veiwing pleasure.

Thank you in advance for your assistance
 

Attachments

Last edited:
You should always have a unique key in a table.

Create another autonumber field for your ServiceMatrixDetailstbl then leave the ServiceMatrixID in your ServiceMatrixDetailstbl as is. That is your FK.
 
Bit more advice.

As ezfriend says, you need a primary key in ServiceMatrixDetailstbl so deselect ServiceMatixID as PK and add a new one.

When populating tables like this, the preferred approach is to use a form/subform setup. If you use the subform wizard, Access will automatically populate the foreign key in the subform.
 
Thank you. thank you, thank you, and thank you!

Thank you for your responses, I did exactly as you stated and well .... it worked! :)

i'm still learning Access so somethigns go over my head .... I appreciate the help!

thank you again
 

Users who are viewing this thread

Back
Top Bottom