L
Lori
I am using Access 2003.
I have an unbound form that I am using as a customized menu for my database
and have multiple tabs which I have set as visible=no. I have an unbound
combo box on my home tab that asks the user to select the type of project
they are working on and would like the appropriate hidden tab to appear once
a user makes their choice. If they Choose "Private" then one tab will appear,
if they choose "DASNY" then another tab will appear. The problem I have is
that either the tabs do not hide after a change is made OR (with the code
below) only the first "ProjectType" works properly. In this case, "Private"
will switch between hidden and unhidden but none of the other tabs work.
Private Sub ProjectType_Change()
If Me.ProjectType = "Private" Then
Me.Accounting.Visible = True
ElseIf Me.ProjectType <> "Private" Then
Me.Accounting.Visible = False
ElseIf Me.ProjectType = "DASNY" Then
Me.DASNY.Visible = True
ElseIf Me.ProjectType <> "DASNY" Then
Me.DASNY.Visible = False
ElseIf Me.ProjectType = "DDC/EDC" Then
Me.DASNY.Visible = True
ElseIf Me.ProjectType <> "DDC/EDC" Then
Me.DASNY.Visible = False
End If
End Sub
Is there a way to enter multiple options so that when a user switches from
one job type to another the appropriate tab will appear and the unneeded one
will be hidden again?
I have an unbound form that I am using as a customized menu for my database
and have multiple tabs which I have set as visible=no. I have an unbound
combo box on my home tab that asks the user to select the type of project
they are working on and would like the appropriate hidden tab to appear once
a user makes their choice. If they Choose "Private" then one tab will appear,
if they choose "DASNY" then another tab will appear. The problem I have is
that either the tabs do not hide after a change is made OR (with the code
below) only the first "ProjectType" works properly. In this case, "Private"
will switch between hidden and unhidden but none of the other tabs work.
Private Sub ProjectType_Change()
If Me.ProjectType = "Private" Then
Me.Accounting.Visible = True
ElseIf Me.ProjectType <> "Private" Then
Me.Accounting.Visible = False
ElseIf Me.ProjectType = "DASNY" Then
Me.DASNY.Visible = True
ElseIf Me.ProjectType <> "DASNY" Then
Me.DASNY.Visible = False
ElseIf Me.ProjectType = "DDC/EDC" Then
Me.DASNY.Visible = True
ElseIf Me.ProjectType <> "DDC/EDC" Then
Me.DASNY.Visible = False
End If
End Sub
Is there a way to enter multiple options so that when a user switches from
one job type to another the appropriate tab will appear and the unneeded one
will be hidden again?