Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub-Switchboard Headers

Status
Not open for further replies.

stormin38

Technical User
Jun 1, 2006
11
US
Question 3...
Is it possible to have a secondary Header on sub-switchboard pages?

I have my main switchboard and then four sub-switchboards that come off of the main one. The database header appears on every switchboard but I would like to add a secondary header that identifies the name of the sub-switchboard a person is looking at beneath the main header.

For Example:

XYZ Database (Main Switchboard)
* Rosters with Contact Info (Sub-switchboard 1)
* Reports and Tools (Sub 2)
* Procedures and Docs (Sub 3)
* Email Exports (Sub 4)
* Research (Sub 5)

- - - - - - -
After you Click on the Rosters with Contact Info it would go to the following switchboard screen (or Sub-switchboard 1) and I want it to look like this:

XYZ Database
ROSTERS WITH CONTACT INFO
* Clients in South Region
* Clients in South East Region
* Clients in North Region

I want to add that secondary heading, is it possible and if so how?
Tracy

 
stormin38,
Assuming you are using the standard switchboard template, add a Label ([tt]lblSubSwitchboard[/tt]) that will hold the sub-switchboard title.

Open up the code module for the Switchboard form and make the following changes (in bold) to [tt]HandleButtonClick()[/tt]
Code:
Private Function HandleButtonClick(intBtn As Integer)
...
        ' Go to another switchboard.
        Case conCmdGotoSwitchboard
            [green]'Update the caption before navigating to the next switchboard[/green]
            [b]If rs![Argument] = "Default" Then[/b]
              [green]'Hide the secondary label on the derfualt menu[/green]
              [b]Me.lblSubSwitchboard.Visible = False
            Else
              Me.lblSubSwitchboard.Visible = True
              Me.lblSubSwitchboard.Caption = rs![ItemText]
            End If[/b]
            Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]
...
End Function

Hope this helps,
CMP

(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top