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.
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
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.