Need help with ComboBox.Visible

Im trying to make a button that when its Action Event starts it makes one of my Comboboxes Visible but I’m running into a problem. I unhides the first combobox1 fine then when i click it again it unhides combobox2 but when i click it again it isn’t unhiding Combobox3 . Im not sure why? here is my code. Can anyone help?

[quote] If ComboBox1.Visible = False then
ComboBox1.Visible = True
elseif ComboBox1.Visible = True then
ComboBox3.Visible = true
elseIf ComboBox3.Visible = True then
ComboBox2.Visible = True
end if[/quote]

What about

If ComboBox1.Visible = False then ComboBox1.Visible = True elseif ComboBox1.Visible = True then ComboBox2.Visible = true elseIf ComboBox2.Visible = True then ComboBox3.Visible = True end if

[quote=163202:@Michel Bujardet]What about

If ComboBox1.Visible = False then ComboBox1.Visible = True elseif ComboBox1.Visible = True then ComboBox2.Visible = true elseIf ComboBox2.Visible = True then ComboBox3.Visible = True end if[/quote]
This still doesn’t produce the 3rd Combobox . Ive tried it . Any other ideas ?

Boolean is pure logic :

If ComboBox1.Visible = False and Combobox2.Visible = False and ComboBox3.Visible = False then ComboBox1.Visible = True elseif ComboBox1.Visible = True and ComboBox2.visible = False and ComboBox3.Visible = False then ComboBox2.Visible = true elseIf (ComboBox1.visible and ComboBox2.Visible) = True then ComboBox3.Visible = True end if

If ComboBox1.Visible = False then ComboBox1.Visible = True elseif ComboBox1.Visible = True And Combobox2.Visible = False then ComboBox2.Visible = true elseIf ComboBox2.Visible = True then ComboBox3.Visible = True end if

Will also fix the problem. Using the debugger to step through the code you would have seen that once Combobox1.visible = True every time you press the button you are setting Combobox2.Visible = true.

[quote=163214:@Wayne Golding] If ComboBox1.Visible = False then ComboBox1.Visible = True elseif ComboBox1.Visible = True And Combobox2.Visible = False then ComboBox2.Visible = true elseIf ComboBox2.Visible = True then ComboBox3.Visible = True end if

Will also fix the problem. Using the debugger to step through the code you would have seen that once Combobox1.visible = True every time you press the button you are setting Combobox2.Visible = true.[/quote]
Worked Great! Thank you Wayne and Michel