Hello all. I'm trying to create a series of 3 cascading combo boxes using a technique I found on this board. The first combo (cbo.Areas) contains a list of "Body Areas" derived from the table of the same name (with columns: AreaID and AreaName). The second combo (cbo.Parts) lists more specific "Body Parts" using an "Areas Query," the SQL View of which is as follows:
SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body Parts].AreaID
WHERE ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));
The Body Parts table consists of columns: PartID, PartName, AreaID. This part works fine! I am able to pull up a body area, such as "Brain," and get a list in the second dropdown box of: "Brain, Skull, Scalp, Face..." etc. Just what I wanted. The problem arises in the 3rd combo box (cbo.Structure1). There is an extensive, even more specific, list of structures within the Body Structures table (formatted the same as the Parts table above) that should show up here but does not. Instead, I get the message:
"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."
The "Structures Query" used for cbo.Structure1 was copied from cbo.Parts:
SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID = [Body Structures].PartID
WHERE ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]))
The Body Structures table currently lists 448 items. Is this simply too much for the query to process? I've read other methods for creating cascading combos but it would appear that they would require me to create tables for each PartID... 35 in all! I am a novice so simple lessons, and any help at all, would be greatly appreciated. Sorry for the lengthy post.
SELECT [Body Parts].PartName
FROM [Body Areas] INNER JOIN [Body Parts] ON [Body Areas].AreaID = [Body Parts].AreaID
WHERE ((([Body Areas].AreaID)=[Forms]![Injuries Form].[cboAreas]));
The Body Parts table consists of columns: PartID, PartName, AreaID. This part works fine! I am able to pull up a body area, such as "Brain," and get a list in the second dropdown box of: "Brain, Skull, Scalp, Face..." etc. Just what I wanted. The problem arises in the 3rd combo box (cbo.Structure1). There is an extensive, even more specific, list of structures within the Body Structures table (formatted the same as the Parts table above) that should show up here but does not. Instead, I get the message:
"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."
The "Structures Query" used for cbo.Structure1 was copied from cbo.Parts:
SELECT [Body Structures].StructureName
FROM [Body Parts] INNER JOIN [Body Structures] ON [Body Parts].PartID = [Body Structures].PartID
WHERE ((([Body Parts].PartID)=[Forms]![Injuries Form].[cboParts]))
The Body Structures table currently lists 448 items. Is this simply too much for the query to process? I've read other methods for creating cascading combos but it would appear that they would require me to create tables for each PartID... 35 in all! I am a novice so simple lessons, and any help at all, would be greatly appreciated. Sorry for the lengthy post.