Hi All,
I'm a semi-newbie by now, which means I know just enough to be dangerous.
At any rate, the title sort of says it all.
I have a form ("Form1") with controls that are visible according to their designation ("Level2" and "Level3" in my case.)
I have another form ("Form2") on the same screen with a ComboBox control such that when it shows "Level2" as the option selected, only a certain set of controls in Form1 will be visible to the user.
If "Level3" is selected, the user will see a different set of Form1 controls.
Here's what I've done so far:
I set a variable "varLevel2," on the Visible property of the Form1 controls that I want to be visible when "Level2" is selected in the Form2 combobox.
Likewise, I set a variable "varLevel3," on the Visible property of the Form1 controls I want to be visible when "Level3" is selected in the Form2 combobox.
On the OnChange* property of the Form2 combobox, I've used:
Set(
varLevel2, If(Form2ComboBox.Selected.Value = "Level2", false
);
Set(
varLevel3, If(Form2ComboBox.Selected.Value = "Level3, false
)
)
)
*The reason I used the OnChange property is because the value ("Level2" or "Level3") is set by a drop-down control in another screen)
The problem is that it only sort of works.
If let's say I select "Level2" in the Form2 combobox, then the Form1 controls whose Visible property I've set as varLevel2 are displayed OK.
But when I select "Level3" in the Form2 combobox, the fields with varLevel3 in their Visible property display alright, but the Level2 controls remain visible as well.
What I want is the Form1 Level2 controls to have the visible property be false when "Level3" is selected in the Form2 combobox, and vice versa.
I sense that I'm close to the solution, but I'm not seeing the forest for the trees.
Any assistance would be greatly appreciated.
Many thanks.