Hi,
I have a junction table, a reference table, and the primary table set up:
tbl_mbr
(PK) mbr_ID
first_name
last_name
...
tblJoin_mbrSkills
(PK) mbr_ID
(PK) skill_ID
years_exp
tblRef_skills
(PK) skill_ID
skill_name
skill_description
I connected and forced referential integrity:
tbl_mbr.mbr_ID 1-many tblJoin_mbrSkills.mbr_ID
tblRef_skill_ID 1-many tblJoin_mbrSkills.skill_ID
I created queries for the forms:
-query for the fields for the main form
qryMbrInfo:
SELECT (fields) FROM tbl_mbr;
-query for individual member skills from junction table
qryMbrSkills:
SELECT tblJoin_mbrSkills.mbr_ID, tblJoin_mbrSkills.skill_ID, tblJoin_mbrSkills.years_exp, tblRef_skills.skill_name
FROM tblRef_skills INNER JOIN tblJoin_mbrSkills ON tblRef_skills.skill_ID = tblJoin_mbrSkills.skill_ID;
-query for combo box for adding new skill
qrySkillsInfo:
SELECT skill_ID, skill_name
FROM tblRef_skills;
I created the main form based on qryMbrInfo and added fields. Then I created a subform based on qryMbrSkills in Continuous Forms View and added the combo box in the subform with the Control Source set to skill_ID and Row Source set to qrySkillsInfo. I want the combo box to show the name, but it shows the ID. If I set the control source to skill_name, I get duplicate entries in the reference table.
Thanks in advance,
-C
I have a junction table, a reference table, and the primary table set up:
tbl_mbr
(PK) mbr_ID
first_name
last_name
...
tblJoin_mbrSkills
(PK) mbr_ID
(PK) skill_ID
years_exp
tblRef_skills
(PK) skill_ID
skill_name
skill_description
I connected and forced referential integrity:
tbl_mbr.mbr_ID 1-many tblJoin_mbrSkills.mbr_ID
tblRef_skill_ID 1-many tblJoin_mbrSkills.skill_ID
I created queries for the forms:
-query for the fields for the main form
qryMbrInfo:
SELECT (fields) FROM tbl_mbr;
-query for individual member skills from junction table
qryMbrSkills:
SELECT tblJoin_mbrSkills.mbr_ID, tblJoin_mbrSkills.skill_ID, tblJoin_mbrSkills.years_exp, tblRef_skills.skill_name
FROM tblRef_skills INNER JOIN tblJoin_mbrSkills ON tblRef_skills.skill_ID = tblJoin_mbrSkills.skill_ID;
-query for combo box for adding new skill
qrySkillsInfo:
SELECT skill_ID, skill_name
FROM tblRef_skills;
I created the main form based on qryMbrInfo and added fields. Then I created a subform based on qryMbrSkills in Continuous Forms View and added the combo box in the subform with the Control Source set to skill_ID and Row Source set to qrySkillsInfo. I want the combo box to show the name, but it shows the ID. If I set the control source to skill_name, I get duplicate entries in the reference table.
Thanks in advance,
-C