conditional tab page

  • Thread starter Thread starter Kay
  • Start date Start date
K

Kay

I put a tab control on a form, and placed two subforms into different tab
pages. The two subforms look virtually identical, except the mater/child
links are different (different child linked to the same master). Depending on
the entry into a list box outside the tab pages, I would like to show only
one or the other tab (i.e. subform). Unfortunately, there is no control under
properties that will allow a conditional view of a tab page (or a subform).
It is either visible "yes or no". I am not a programmer and I hoped there
would be an easy way around it (even having only one tab page which
conditionally shows a subform with a change in the master/child link
depending on the list box entry).
 
What you need to do is program the condition. Something like (untested):

Sub lstWhatever_AfterUpdate()
If Me.lstWhatever = "SomeValue" Then
Me.Page4.Visible = True
Else
Me.Page4.Visible = False
End Sub
End Sub
 
Back
Top