A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hiding/Unhiding Tabs



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2010, 04:41 PM posted to microsoft.public.access.forms
Lori
external usenet poster
 
Posts: 673
Default Hiding/Unhiding Tabs

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?
  #2  
Old February 24th, 2010, 05:15 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Hiding/Unhiding Tabs

Lori -

Try this:

Private Sub ProjectType_Change()
If Me.ProjectType = "Private" Then
Me.Accounting.Visible = True
Else
Me.Accounting.Visible = False
End If
If Me.ProjectType = "DASNY" Then
Me.DASNY.Visible = True
Else
Me.DASNY.Visible = False
End If
If Me.ProjectType = "DDC/EDC" Then
Me.DASNY.Visible = True
Else
Me.DASNY.Visible = False
End If
End Sub

--
Daryl S


"Lori" wrote:

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?

  #3  
Old February 24th, 2010, 05:21 PM posted to microsoft.public.access.forms
Lori
external usenet poster
 
Posts: 673
Default Hiding/Unhiding Tabs

you are wonderful. THANKS

"Daryl S" wrote:

Lori -

Try this:

Private Sub ProjectType_Change()
If Me.ProjectType = "Private" Then
Me.Accounting.Visible = True
Else
Me.Accounting.Visible = False
End If
If Me.ProjectType = "DASNY" Then
Me.DASNY.Visible = True
Else
Me.DASNY.Visible = False
End If
If Me.ProjectType = "DDC/EDC" Then
Me.DASNY.Visible = True
Else
Me.DASNY.Visible = False
End If
End Sub

--
Daryl S


"Lori" wrote:

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?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.