Blank third cascading combo... STUCK!

S

sanador

I am having a great deal of difficulty with cascading combos on a form
("Injuries Form"). I am trying to add a third combo to a successfully paired
two. I'd like a Body Structures combo to rely upon the value submitted for
Body Part, and that to rely upon the value in Body Area. For example, a
choice of "Upper Extremity"
for Body Area could lead to choosing "Shoulder" in the Part combo and then
"Rotator Cuff" as a Structure. Please see another of my posts below for
further
details:

I used this method successfully in tying together 2 combo boxes, but have
run into a brick wall in attempting to add a third. Summary of data:

Body Areas table (AreaID, AreaName)
Body Parts table (PartID, PartName, AreaID)
Body Structures table (StructureID, StructureName, PartID)

Body Area combo (cboAreas) with AfterUpdate ReQuery

Body Part combo (cboParts) with AfterUpdate ReQuery and tied to Areas Query:

SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body
Parts].AreaID
GROUP BY [Body Parts].PartName, [Body Areas].AreaID
HAVING ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));

Body Structure combo (cboStructure1) tied to Parts Query:

SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID =
[Body Structures].PartID
GROUP BY [Body Structures].StructureName, [Body Parts].PartID
HAVING ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]));

As I said, the first pair of combos is working perfectly. In the third, I
get nothing but a blank drop down list. I've been struggling with this for
some time and can't seem to find any answers. Any help would be appreciated.
 
M

Michael Gramelspacher

I am having a great deal of difficulty with cascading combos on a form
("Injuries Form"). I am trying to add a third combo to a successfully paired
two. I'd like a Body Structures combo to rely upon the value submitted for
Body Part, and that to rely upon the value in Body Area. For example, a
choice of "Upper Extremity"
for Body Area could lead to choosing "Shoulder" in the Part combo and then
"Rotator Cuff" as a Structure. Please see another of my posts below for
further
details:

I used this method successfully in tying together 2 combo boxes, but have
run into a brick wall in attempting to add a third. Summary of data:

Body Areas table (AreaID, AreaName)
Body Parts table (PartID, PartName, AreaID)
Body Structures table (StructureID, StructureName, PartID)

Body Area combo (cboAreas) with AfterUpdate ReQuery

Body Part combo (cboParts) with AfterUpdate ReQuery and tied to Areas Query:

SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body
Parts].AreaID
GROUP BY [Body Parts].PartName, [Body Areas].AreaID
HAVING ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));

Body Structure combo (cboStructure1) tied to Parts Query:

SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID =
[Body Structures].PartID
GROUP BY [Body Structures].StructureName, [Body Parts].PartID
HAVING ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]));

As I said, the first pair of combos is working perfectly. In the third, I
get nothing but a blank drop down list. I've been struggling with this for
some time and can't seem to find any answers. Any help would be appreciated.

There i no way to test this, but I think it should be something like this:

SELECT [Body Structures].StructureName
FROM [Body Structures]
INNER JOIN ([Body Areas]
INNER JOIN [Body Parts]
ON [Body Areas].AreaID = [Body
Parts].AreaID)
ON [Body Parts].PartID = [Body Structures].PartID
GROUP BY [Body Structures].StructureName,[Body Parts].PartID,[Body Areas].AreaID
HAVING [Body Parts].PartID = [Forms]![Injuries Form].[cboParts]
AND [Body Areas].AreaID = [Forms]![Injuries Form].[cboAreas];
 
S

sanador

Unfortunately, no change. Thank you, though, for the idea! Please keep them
coming!

Michael Gramelspacher said:
I am having a great deal of difficulty with cascading combos on a form
("Injuries Form"). I am trying to add a third combo to a successfully paired
two. I'd like a Body Structures combo to rely upon the value submitted for
Body Part, and that to rely upon the value in Body Area. For example, a
choice of "Upper Extremity"
for Body Area could lead to choosing "Shoulder" in the Part combo and then
"Rotator Cuff" as a Structure. Please see another of my posts below for
further
details:

I used this method successfully in tying together 2 combo boxes, but have
run into a brick wall in attempting to add a third. Summary of data:

Body Areas table (AreaID, AreaName)
Body Parts table (PartID, PartName, AreaID)
Body Structures table (StructureID, StructureName, PartID)

Body Area combo (cboAreas) with AfterUpdate ReQuery

Body Part combo (cboParts) with AfterUpdate ReQuery and tied to Areas Query:

SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body
Parts].AreaID
GROUP BY [Body Parts].PartName, [Body Areas].AreaID
HAVING ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));

Body Structure combo (cboStructure1) tied to Parts Query:

SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID =
[Body Structures].PartID
GROUP BY [Body Structures].StructureName, [Body Parts].PartID
HAVING ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]));

As I said, the first pair of combos is working perfectly. In the third, I
get nothing but a blank drop down list. I've been struggling with this for
some time and can't seem to find any answers. Any help would be appreciated.

There i no way to test this, but I think it should be something like this:

SELECT [Body Structures].StructureName
FROM [Body Structures]
INNER JOIN ([Body Areas]
INNER JOIN [Body Parts]
ON [Body Areas].AreaID = [Body
Parts].AreaID)
ON [Body Parts].PartID = [Body Structures].PartID
GROUP BY [Body Structures].StructureName,[Body Parts].PartID,[Body Areas].AreaID
HAVING [Body Parts].PartID = [Forms]![Injuries Form].[cboParts]
AND [Body Areas].AreaID = [Forms]![Injuries Form].[cboAreas];
 
M

Michael Gramelspacher

Unfortunately, no change. Thank you, though, for the idea! Please keep them
coming!

Michael Gramelspacher said:
I am having a great deal of difficulty with cascading combos on a form
("Injuries Form"). I am trying to add a third combo to a successfully paired
two. I'd like a Body Structures combo to rely upon the value submitted for
Body Part, and that to rely upon the value in Body Area. For example, a
choice of "Upper Extremity"
for Body Area could lead to choosing "Shoulder" in the Part combo and then
"Rotator Cuff" as a Structure. Please see another of my posts below for
further
details:

I used this method successfully in tying together 2 combo boxes, but have
run into a brick wall in attempting to add a third. Summary of data:

Body Areas table (AreaID, AreaName)
Body Parts table (PartID, PartName, AreaID)
Body Structures table (StructureID, StructureName, PartID)

Body Area combo (cboAreas) with AfterUpdate ReQuery

Body Part combo (cboParts) with AfterUpdate ReQuery and tied to Areas Query:

SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body
Parts].AreaID
GROUP BY [Body Parts].PartName, [Body Areas].AreaID
HAVING ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));

Body Structure combo (cboStructure1) tied to Parts Query:

SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID =
[Body Structures].PartID
GROUP BY [Body Structures].StructureName, [Body Parts].PartID
HAVING ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]));

As I said, the first pair of combos is working perfectly. In the third, I
get nothing but a blank drop down list. I've been struggling with this for
some time and can't seem to find any answers. Any help would be appreciated.

There i no way to test this, but I think it should be something like this:

SELECT [Body Structures].StructureName
FROM [Body Structures]
INNER JOIN ([Body Areas]
INNER JOIN [Body Parts]
ON [Body Areas].AreaID = [Body
Parts].AreaID)
ON [Body Parts].PartID = [Body Structures].PartID
GROUP BY [Body Structures].StructureName,[Body Parts].PartID,[Body Areas].AreaID
HAVING [Body Parts].PartID = [Forms]![Injuries Form].[cboParts]
AND [Body Areas].AreaID = [Forms]![Injuries Form].[cboAreas];

Just a suggestion. You may want to change your table structures.

Body Areas (AreaID, AreaName)
Body Parts (PartID, PartName)
Body Structures (StructureID, StructureName)
Body Area Parts (AreaID, PartID)
AreaID References [Body Areas] (AreaID),
PartID References [Body Parts] (PartID),
Primary Key (AreaID, PartID)
Body Area Part Structures (StructureID, AreaID, PartID)
StructureID References [Body Structures] (StructureID),
AreaID, PartID References [Body Area Parts) (AreaID, PartID),
Primary Key (StructureID, AreaID, PartID)

Three entities and two relations.

Second combobox is based on [Body Area Parts] query.
Third combobox is based on [Body Area Part Structures] query.
 

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