For my biology database: I have a main form (species) and a subform (traits). Each trait is identified both by an autonumber index value and a Trait_CODE (8 characters, in sortable order); for each Trait, the user may chose among a number of trait-specific selections. So, if Size is a Trait, Selections may be Very Small, Small, Medium...etc. But for Shape the Selections should be Elongate, Medium, Round,...etc.
I have set up a sample form with unbound combo boxes to cascade selection values: (1) cboTrait and (2) cboSelection:
for cboTrait
SELECT qry_BFId_Traits.Trait_CODE
FROM qry_BFId_Traits
ORDER BY qry_BFId_Traits.Trait_CODE;
> Also in this combo box have an AfterUpdate event:
Private Sub cboTrait_AfterUpdate()
CboSelection.Value = Null
CboSelection.Requery
End Sub
for cboSelection
SELECT qry_BFId_Selections.Selection_SH, qry_BFId_Selections.Trait_CODE
FROM qry_BFId_Selections
WHERE (((qry_BFId_Selections.Trait_CODE)=[forms]![Form1]![cboTrait]));
This works to create cascading selections satisfactorily, in an isolated form with no query associations.
BUT, I cannot figure out how to connect this to the fields I am trying to fill in my continuous subform query (namely [TraitData_TraitId] and [TraitData_SC_SelectionID]), each of which links to a separate table for reference look-up values.
As far as i can tell, this combo box example only works (1) when unbound, or (2) when in a main form, controlling all records in subform, but my specific objective is to create separate, cascading selection choices for each row in my continuous subform. How do I do this?
Sorry, I am sure this is a dumb, oft-repeated question. But I'm brand new to the group and hope I can get some insight.
Thanks in advance!