Many to One Relationship Question

C

Crystal

Hello,

Any suggestions would be greatly appreciated!

I have a MAIN Table that contains an ID and other info on
items. Another table links to this table by the ID and
provides shipping info. The MAIN table is set to not allow
duplicate ID's (we create the ID's). The problem is that
in the shipping table, we need to have multiple entries
for a particular item. For ex: an item could be shipped
in 1 or 2 parts so we could have more than one document to
record. I allowed the ID's to be in the shipping table as
duplicates.

I have a form with tabs. On the tab for shipping info,
one of the subforms gets it's data from a query that pulls
info from several tables (one of which is the shipping
table). Since the ID can be in the Shipping table more
than once, the first entry is only shown on this subform.

How can I allow the user to see the other items in the
Shipping table as well. Am I going about this the wrong
way?

Thanks!
 
T

Tim Ferguson

I have a MAIN Table that contains an ID and other info on
items. Another table links to this table by the ID and
provides shipping info. The MAIN table is set to not allow
duplicate ID's (we create the ID's). The problem is that
in the shipping table, we need to have multiple entries
for a particular item. For ex: an item could be shipped
in 1 or 2 parts so we could have more than one document to
record. I allowed the ID's to be in the shipping table as
duplicates.

Okay: the PK for the Items table is plain, but I am not sure what is the PK
for the Shipments table. Presumably you need either a combination of
(ItemID, ShipmentPartNum) or a separate surrogate key (ShipmentNumber).
I have a form with tabs. On the tab for shipping info,
one of the subforms gets it's data from a query that pulls
info from several tables (one of which is the shipping
table). Since the ID can be in the Shipping table more
than once, the first entry is only shown on this subform.

You will need the whole key of the Shipments table, whichever of the above
routes you have taken, so that the subform can track back to the correct
rows in the table.

Hope that helps


Tim F
 
J

John Vinson

How can I allow the user to see the other items in the
Shipping table as well. Am I going about this the wrong
way?

You can use a Continuous or Datasheet view for the Subform to show
more than one record, or use the navigation buttons on a single form
view Subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top