conditional tab page

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).
 
A

Arvin Meyer [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top