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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Reference Help (parent and child list)

Status
Not open for further replies.

Steven547

Technical User
Sep 15, 2004
165
US
Ok...I'm am so lost on how to do this...
I have a table. There is column 1 and column 2. Only certain fields in column 2 are associated with certain fields in column 1. (Basically, the "sticks" are only associated with "Hockey" and "field goal" with "Football") Make sense so far?
I want to have a dropdown. When I select HOCKEY in the first dropdown, the OTHER dropdown only displays those items associated with HOCKEY.
If I selected Football, only the items associated with Football would appear. Can someone "hold my hand" and walk me through this please? I don't know why I'm so lost on this.

Thanks.
 
Some reading:
Fundamentals of Relational Database Design
Then:
faq702-4289

Your table isn't normalize. Very important to normalize tables first.
So:
tblGame
GameID
GameName

tblEquipment
EquipmentID
GameID
Description

A one-to-many relationship. Although a case could be made for a many-many relationship, but why complicate matters?

"Only certain fields in column 2" You mean certain data in column 2. Language is important.
 
You would have a parent table called, say, SPORTS. Then you would have a detail table called HOCKEY and another called FOOTBALL. Based on an indicator code in the SPORTS table, you would join to the appropriate detail table.

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright
 
Then you would have a detail table called HOCKEY and another called FOOTBALL

not necessarily...if those TWO detail tables contained EXACTLY the same information then what you would want is a SINGLE detail table with a field that indicates SportType where Football and Hockey would be stored.

Leslie

Have you met Hardy Heron?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top