Hopefully this is a really simple question, but in all my playing around with
access and looking through my textbook and reading through these forums I
have not been able to find out how to create a composite key. Could someone
please give me a step-by-step of how to do it?
Open the table in design view.
Ctrl-click each field (up to ten) that you want included in the composite
primary key. Each field should darken to indicate that it has been selected.
Click the Key icon on the toolbar.
You will now have a composite key, allowing any one (or any subset) of the
fields to be duplicated but disallowing records with duplicates in all the
fields.
If you want to have the same set of fields as foreign keys in another table,
include them in the second table's design (with the same sizes and datatypes);
in the relationships window join *all* of the primary key fields to the
corresponding foreign key field. Set referential integrity on all of them (I
think that's needed but I'm not certain).
It's often easier to use a surrogate primary key such as an Autonumber, and
just create a unique index on your composite of fields.