M
Melissa
I have a many-to-many relationship. My table structure is:
tblClubTeam
ClubTeamID (PK)
ClubTeamAge
ClubTeamName
tblEvaluationSites
EvalSiteID (PK)
SiteName
SiteStartDate
SiteEndDate
SiteCity
SiteState
tblClubTeamTournaments
ClubTeamID (composite PK)
EvalSiteID (composite PK)
This last table is a junction table because one team will
play in many tournaments and one tournament will have many
teams.
In my relationships window, I have created one-to-many
relationships between the first two tables and the
junction table, enforcing referential integrity.
My master form (frmClubTeamTournamentSchedule) is built on
a query containing the necessary fields from tblClubTeam.
(I use concatenation a lot; so I build all forms and
reports off queries.)
I want the subform to allow me to enter each team's
tournament schedule on a continous form. The fields I need
on the subform are all from tblEvaluationSites.
Specifically, SiteName, SiteStartDate, SiteCity,
SiteState. Further, I want to be able to select the
SiteName from a lookup/dropdown/combo box.
I have tried everything I know and then some. My questions
basically boil down to:
1. How do I link the master and subform? I know that they
have to link through the PK field ClubTeamID. The master
form contains ClubTeamID; but the subform only contains
fields from tblEvaluationSites. Do I make the source of
the subform a query built on tblEvaluationSites and my
junction table? If so, which PK fields do I include from
which table?
2. How do I make SiteName in the subform a lookup/dropdown
box from which I can select a specific tournament for that
ClubTeam?
Thank you so much for your help!
tblClubTeam
ClubTeamID (PK)
ClubTeamAge
ClubTeamName
tblEvaluationSites
EvalSiteID (PK)
SiteName
SiteStartDate
SiteEndDate
SiteCity
SiteState
tblClubTeamTournaments
ClubTeamID (composite PK)
EvalSiteID (composite PK)
This last table is a junction table because one team will
play in many tournaments and one tournament will have many
teams.
In my relationships window, I have created one-to-many
relationships between the first two tables and the
junction table, enforcing referential integrity.
My master form (frmClubTeamTournamentSchedule) is built on
a query containing the necessary fields from tblClubTeam.
(I use concatenation a lot; so I build all forms and
reports off queries.)
I want the subform to allow me to enter each team's
tournament schedule on a continous form. The fields I need
on the subform are all from tblEvaluationSites.
Specifically, SiteName, SiteStartDate, SiteCity,
SiteState. Further, I want to be able to select the
SiteName from a lookup/dropdown/combo box.
I have tried everything I know and then some. My questions
basically boil down to:
1. How do I link the master and subform? I know that they
have to link through the PK field ClubTeamID. The master
form contains ClubTeamID; but the subform only contains
fields from tblEvaluationSites. Do I make the source of
the subform a query built on tblEvaluationSites and my
junction table? If so, which PK fields do I include from
which table?
2. How do I make SiteName in the subform a lookup/dropdown
box from which I can select a specific tournament for that
ClubTeam?
Thank you so much for your help!