You're building spreadsheets not a database. There is only 1 purchase order,
but there can be many orders associated with it.
PO table with 1 PO number - PK
Order Table with 1 Order Number - PK
Many PO#s - FK
Many Inventory #s - FK
Inventory Table
Inventory # - PK
That's the way it should work.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"5ifthcitizen" wrote in message
...
I am having trouble adding a primary key and creating linking tables. When
I
try to add a primary key, and go back to the datasheet view it tells me
that
i have duplicate information. This happens with a couple different tables:
1. A purchase table that I want the primary key to be purchase # but each
purchase # can have multiple order #s. So I have duplicate purchase #s
because of this. Is there a way to set the purchase # as the primary key
without deleting the order # column? Somebody suggested using a query that
I
could turn into a table but I don't know if that would work or how it
would
work.
2. An order table that I want the primary key to be order # but each order
#
can have multiple inventory #s. I moved the inventory #s into a separate
linking table where I put order # and inventory # as the primary key. But
the
order table still has duplicate order #s so it won't let me use order # as
the primary key. How can i set order # as the primary key in the order
table
and get rid of the redundancy?
Any help is appreciated, Thanks.