A family of Microsoft relational database management systems designed for ease of use.
Scott,
This may help illustrate what part of the big picture is. Because my colleague and I find ourselves needing to accelerate from beginner knowledge of access to advanced, we may be doing things out of the ordinary or unorthodox, and I’m certain previous iterations of this DB had nothing but garbage.
The whole junction table thing may be semantics, so let’s call them stand alone “join tables” of the PKs from several parent tables, the primary difference being that instead of several FK fields in the parent table, we put them in a table unto themselves. All the relationships are valid, information integrity (i.e. this record relates to that one) and DB functionality all work fine. If it matters, which I don’t think it does for the question- We will have other tables that are many-to-many (Apps, Programs, Files, Equipment that are needed to perform a ‘Function’) they just aren't moved in yet. Regardless;
- If I can use "join/junction/hermaphrodite tables” in a DB query (outside of a form) to retrieve records (and I've done so repeatedly); where there is a unique ‘value’ criteria specified,
- how do I do that in a form where I want the criteria to be based on the value of a previous combo box?
I want the combo query to function like the simple query did, but where I just typed “Blah” in the criteria, I want Combo box 2 to look at Combo 1 and if Combo1 says “blah” it returns a set of records related to that in Cbo2. If Cbo1 says “Tweaky Weasle Farts” then the records displayed in Cbo2 are related to “Tweaky Weasle Farts” because the ” join/junction/hermaphrodite tables” says the PKs in the two tables are related.
I’ve being working at this for a while, and mixed results with my test form. I progressed from getting nothing in cboDivision, thru to the "Floating Error Box of Woe" where upon opening the form it immediately broke and wanted a value for either ServiceID, or DivisionID… once I think it may have asked what my favorite color was… (I could be mistaken due to caffeine levels).
I’ve now got the Form to where after making a selection from the list in cboService, next cboDivision displays the correct DivisionIDs (not the Division text field) that correspond to the “Service” selected. It appears that it’s SQL is making a backwards association to the Organization/join-junction-hermaphroditetable*.*Here’s the code:
SELECT DivisionsTbl.Division, DivisionsTbl.DivisionID, ServicesTbl.ServiceID, OrgJunctTbl.ServiceID
FROM ServicesTbl
INNER JOIN (DivisionsTbl INNER JOIN OrgJunctTbl ON DivisionsTbl.DivisionID = OrgJunctTbl.DivisionID)
ON ServicesTbl.ServiceID = OrgJunctTbl.ServiceID
WHERE (((OrgJunctTbl.ServiceID)=[ServicesTbl]![ServiceID]
And (OrgJunctTbl.ServiceID)=[Forms]![fmTest_2a_Robs]![cboService])) ORDER BY DivisionsTble.Divison
The DivisionIDs are correct, and match the parent table, but the display is from the join-junction-herma-phodite table, rather than the parent. I say this because the pull-down displays the IDs in the order they’re in on the join-junction-hermaphrodite. 'Division' is the text field that I want displayed.