ComboBox depending of other comboBoxes

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • ComboBox depending of other comboBoxes

    Hi everyone!

    I have some comboBoxes in my report and one of them have a data filter that make him dependent of what it's selected on the other comboBoxes.
    In other words, what this comboBox will show will depend of what I select in the other comboBoxes.
    At this point everything works fine, BUT here is my problem: When I select some value in all my comboBoxes, and AFTER this, I change the value of one of the ComboBoxes that determine which elements will be shown in the other comboBox, making an incomplatible match, the report crash.
    How can a make the following?: Everytime I select a new element in one comboBox, the other comboBoxes will return to their default value (for example, the first level of the consolidates element from the hierarchy)
    Is there a simpler way to fix this??

    Let's pretend that I have 3 comboBoxes with the following names: cmb1, cmb2 and cmb3. The three of them get their data from a Cube, and the three of them target a named range equal as their name, ie, cmb1, cmb2 and cmb3.
    Let's say that cmb1 show the following element to select: "evens", "odds"
    Let's say that cmb2 let me select one of these numbers: "10", "20", "30"
    Remember that cmb3 have a Datafilter of what is selected in cmb1 and cmb2, so cmb3 will only show the elements that result of the combination of the selection in cmb1 and cmb2.
    Now that I already selected something in cmb1 and cmb2, cmb3 will show the result of the combination selected, for example, if I chose "evens" in cmb1 and "10" in cmb2, cmb3 will show the even numbers between 0 and 10, this is: 2, 4, 6, 8
    So let's say that I chose "8" in cmb3
    Now, with everything selected, if I change my selection in cmb1 to "odds" the report crash because the selection made before in cmb3, "8", is not compatible and does not exists in the elements that cmb3 should offer this time (which are "1", "3", "5", "7", "9").
    That's my problem.

    I thought of building a macro for cmb1 and cmb2 that change the value of cmb3 whenever a new selection is made in cmb1 and cmb2 but, as I'm not working with variables (I'm working with range names) I couldn't figure out a way.

    Please help me solve this. I will appreciate it :D

    Dee Gee