Experts. I have a program where I am trying to hide all controls if an argument is met. The argument is met, I'm hiding all controls and I'm getting the error you can't hide a control that has focus (Source (textbox) ).
Just above this statement of hiding the control, I have the program setting focus to the close button. Seems to be ignoring the fact that I've set focus to the close button. txtSource never gets focus and is item 41 in tab control so I don't see how it's getting focus.
If MarketType = 0 Or (MarketType = 1 And HomeCount = 0) Then
'First Source Box: Hide
Me.lblSource.Visible = False
Me.Source1Box.Visible = False
Me.Source.Visible = False