Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visibility Set to True, False Automatically

Status
Not open for further replies.

frog40

Programmer
Oct 25, 2006
69
US
I have two pages to work with (for now). The first page uses a Macro to go to Page 2. This Macro sets the Focus for ComboBox1 on Page 2. (Visibility is set to True)

On Page 2, the first thing I want to happen is to set the visibility for ComboBox1 to False. I cannot make this happen. Since the focus was pre-set to this ComboBox, I used "Me.Visibility = False". This did not work. I do not want any user activity to do this.

I might mention that each Option button (3 altogether) will have it's own ComboBox. I will need to set them all to False until an Option Group button is selected. Then, only the matching ComboBox visibility will be automatically set to True.
 
How are ya frog40 . . .

[blue]You can't hide a control while it has the focus![/blue]

You need to set the focus elsewhere then hide the combo . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Sorry about the duplicate question. I found the thread you suggested. I will give it a try. Thanks a bunch.
 
'Me.Visibility = False' would set the form's visibility property, no?

Code:
Me.[i]ControlName[/i].Visibility = True|False




~Melagan
______
"It's never too late to become what you might have been.
 
Yes Melagan, you are correct. The problem I had was setting the focus. The suggestion on the Forum listed above sets the focus by using a dummy text box works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top