Limit content in one combo box based on another combo box selectio

G

Guest

I have tried three different methods I've found here and in online help, and
have yet to get a successful run. Please help!
My data is coming from one table.

"Skills_Talents"
Field1 "ID"
Field2 "SkillGroup"
Field3 "SpecificSkill"
Field4 "Requirements"

My Combo boxes are on the following form
Form "Personal_Skills"
ComboBox1 "SkillGroup"
ComboBox2 "SpecificSkill"
ComboBox3 "Requirements"

I tried 2 descriptions for Synchronized Combo Boxes with two queries, a
requery on the form and a requery & setfocus on the first combo box....
I tried setting the first box to a field list row source to the table with
an after update event with a query.....
I think I must be missing pieces to each of these settings. IS there a
simpler method??
Thanks TONS in advance,
Vivian
 
G

Guest

Hi

I would split this up into 3 tables:
TableName: SkillGroup
Field1: SkillGroupID
Field2: SkillGroupDescription

TableName: SpecificSkills
Field1: SpecificSkillID
Field2: SpecificSkillDescription
Field3: SpecificSkillParent

TableName: Requirements
Field1: RequirementsID
Field2: RequirementsDescription
Field3: RequirementsParent

You will need to create one-to-many relationships for RequirementsParent and
SpecificSkillID, then for SpecificSkillParent and SkillGroupID.

Then on your form, in your combo/list boxes, have a query for each table and
in the "Parent" Criteria, link it to the previous control. ie.

cmbSkillgroup.RowSource = SELECT SkillGroup.SkillGroupID,
SkillGroup.SkillGrouupDescription FROM SkillGroup;

cmSpecificSkill.RowSource = SELECT SpecificSkills.SpecificSkillID,
SpecificSkills.SpecificSkillDescription, SpecificSkills.SpecificSkillParent
FROM SpecificSkills WHERE
(((SpecificSkills.SpecificSkillParent)=Forms!Form1!Combo0));

cmbRequirements.RowSource = SELECT Requirements.RequirementsID,
Requirements.RequirementsDescription, Requirements.RequirementsParent FROM
Requirements WHERE (((Requirements.RequirementsParent)=Forms!Form1!Combo2));

Then for each of the combo box, have some code in the BeforeUpdate event:

cmbSkillgroup.Requery
cmbSpecificSkill.Requery
cmbRequirements.Requery


I hope this helps.
 

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