Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relating tables one to many in chain

Status
Not open for further replies.

Imbriani

Programmer
Jan 9, 2004
195
US
Hi all,

This is probably a stupid question and this task seems very simple, but I can't seem to get it to work.

I have three tables: Countries, Commdities and Schedules. I want to relate all three in one to many relationshipsin a chain:

Countries -> Commodities ->Schedules

Countries (ID as Primary key) related to Commodities (Primary key commoditiesID; foreign key ID) on ID.
Commodities (CommoditiesID as Primary key) related to Schedules (Primary key schedulesID; foreign key CommditiesID)

I could have sworn I have done this before, but I can't seem to get this to work. Entry into Countries and then commodities produces the entry of the ID in the foreign key field of Commodities, but this does not happen when I get to schedules. Anyone have an idea what I'm overlooking??
 
I take it you have joined the three tables with a query and now you are trying to update the query?

This a clever Access thing that it lets you do this but there are some rules. Check help - if you want it to autopopulate etc you have to include the key and/or the foreign key in each case (I forget which). There is also a limitation on how many of the tables, in this kind of situation, you can change.

Read this for details:
 
Thanks so much, BNPMIKE. I finally did figure this out. I was using subforms on a form and for some strange reason, the program wouldn't accept my linking more than one subform. I rebooted the machine and ran the subform wizard and, voila, it worked! No idea what was wrong. But, thanks for the link anyway. This is good info on an issue I wrestle with everyday in admin on databases with multiple tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top