View Full Version : How do I make a compound key?


_Kev
01-31-2007, 12:50 PM
Howdy all,

I'm attempting to set up a junction table.

The help for junctions says to make a compound key in the junction table, but I don't understand the intructions for this. Do they mean make all three of ID's the junction table PK's or is there a literal "Make a Compound Key"
button somewhere?

Currently, the table has an AutoIncrementing field as the PK and the two FK's copied in from the Primaries (converted from Auto to Number). As a result, I can only make one-to-one relationships to the junction table.

Please let me know what it is I am missing here.

Thanks

KeithG
01-31-2007, 12:58 PM
A compound key is a key made up of more than one atribute/field.

GohDiamond
01-31-2007, 01:03 PM
In the table design view, select the fields you want to use as a "compound" key and then click on the key

This is another way to say the same thing KeithG said

Goh

_Kev
01-31-2007, 01:18 PM
Ok, it was sort of my first guess. Thanks for the clarification.

Now that I've established the compound key, how do I establish the one-to-many relationship? After the drag and drop I'm still stuck with a one-to-one relationship.

_Kev
01-31-2007, 02:45 PM
I forgot to turn off the indexes in the junction table. Silly me.

Thanks again for the help guys.