How would one go about getting a count of the values chosen from a drop-down list? I have 18 drop-down lists that all have the same options: Infant, Toddler, Preschool and School Age. I have a total box at the bottom for each of these areas and would like to get a count of how many boxes are filled in with each choice.
For example, if 12 boxes are chosen as Infant, 2 as Toddler, 1 as Preschool and 3 as School Age, I would like my results box to count only the 12 Infant choices and give me 12 as a result. I need to repeat this process across 3 other boxes to count the number of Toddler, Preschool and School Age choices as well, but I'm sure I can merely copy the formula over.
Here is the code I am currently using, but it counts all the fields that have any value in them, not just the ones with the Infant value.
foreach Infant in (topmostSubform.Page3[*]) do
Count(RoomAge[*])
endfor
Any help is appreciated, please let me know if you need more information.