D
dhstein
How can I set a combo box property to visible in VBA ? Thanks for any help.
Chris O'C via AccessMonster.com said:Use this syntax:
Me.comboboxname.Visible = True
Chris
--
Thanks - that worked. Now I'd like to set the visible property to False after the Control loses focus - but the Lost focus event seems to not be doing the trick - I get a message that you can't hide a control that has the focus. So I'm using the ComboBox to perform some commands and then I'd like to set it to not visible again. Thanks for any ideas.
Chris O'C via AccessMonster.com said:Are you sure you want the combo box to go invisible right after the user
makes his/her change? What if they made a mistake and want to change it?
The combo box is gone. That's not user friendly.
If you must make it invisible, use this syntax in the lost focus event of
every control on the form able to get the focus:
If (Screen.PreviousControl.Properties("Name") = Me.comboboxname.Name)
Then
Me.comboboxname.Visible = False
End If
Chris