I would like to hide a control when it loses focus. I programmed
Private Sub lstMenu1_LostFocus()
lstMenu1.Visible = False
End Sub
Unfortunately, on Lost Focus, that control still has the focus, and will not make it visible until it has lost focus.
Is there any way to find out which control the user was moving to, and then do <NewField>.SetFocus, before running the visible line? I don't want to give focus to the next field in tab order because they may not have gone there and there would be a disconnect.
I also have tons of controls, and I don't want to put code in every control's GetFocus to check if that control is visible and then hide it.
Any help? Thanks.
Private Sub lstMenu1_LostFocus()
lstMenu1.Visible = False
End Sub
Unfortunately, on Lost Focus, that control still has the focus, and will not make it visible until it has lost focus.
Is there any way to find out which control the user was moving to, and then do <NewField>.SetFocus, before running the visible line? I don't want to give focus to the next field in tab order because they may not have gone there and there would be a disconnect.
I also have tons of controls, and I don't want to put code in every control's GetFocus to check if that control is visible and then hide it.
Any help? Thanks.