Active sections on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form with tab controls and have created list boxes to
control what information is visible on each tab section. I have two list
boxes on the form and two tabs. what I would like to do is when page1 is
active/ontop have list box 1 visible and list box2 either grayed out or not
visible. When I select the tab for page2 have list box1 either go gray/or
invisible and list box2 become visible or turn white. I would like to use
this a visual reference to make it easier for the user to know which list box
controls the information viewed on the form.
 
Assuming the first page of the tab control is selected when the form opens
set the Visible property of the second list box to False. In the tab
control’s Change event procedure put:

Me.lst1.Visible = (Me.YourTabControl = 0)
Me.lst2.Visible = (Me.YourTabControl = 1)

Where lst1 and lst2 are the names of the list boxes and YourTabControl is
the name of the tab control. If you'd prefer them grayed out set the Enabled
property instead of the Visible property.

Ken Sheridan
Stafford, England
 
Back
Top