Switchboard pages

K

Kogle

I want to put different headings on each switchboard page. I used the
Switchboard manager to make the switchboard, but don't know how to do a
different header on each page or to format the font on each page.

Thanks
 
F

fredg

I want to put different headings on each switchboard page. I used the
Switchboard manager to make the switchboard, but don't know how to do a
different header on each page or to format the font on each page.

Thanks

Are you talking about the Switchboard created by the built-in Access
Switchboard Manager?

You can change some of the code in the Switchboard's Private Sub
FillOptions() procedure.
Make the change starting at the If (rs.EOF) Then line.
Watch out for word wrap.
The code below assumes you have 3 menu pages.

Private Sub FillOptions()
......
......
If (rs.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rs.EOF))
Me("Option" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Caption =
rs![ItemText]
rs.MoveNext
Wend
If Me.SwitchboardID = 1 Then
Label1.Caption = "I'm the Forms Menu."
Label2.Caption = "I'm the forms Menu"
ElseIf
Label1.Caption = "I'm the Reports Menu"
Label2.Caption = "I'm the Reports Menu"
Else
Label1.Caption = "I'm the Queries Menu"
Label2.Caption = "I'm the Queries Menu"
End If
End If
rs.Close
Set rs = Nothing
Set con = Nothing

End Sub


The Built-in Switchboard created by the Switchboard Manager has been
called a complicated solution to a simple problem.
Why not create your own switchboard(s) using unbound forms with
command buttons?
You can have as many buttons as you wish, and if you use the command
button wizard when adding the buttons, Access will even wrote most of
the code for you. You will have more control over how the switchboard
look and works, and maintenance will be simpler.
 
K

Kogle

That is what I thought. I will design my own and be able to edit as I want.
Thanks for the quick reply.

fredg said:
I want to put different headings on each switchboard page. I used the
Switchboard manager to make the switchboard, but don't know how to do a
different header on each page or to format the font on each page.

Thanks

Are you talking about the Switchboard created by the built-in Access
Switchboard Manager?

You can change some of the code in the Switchboard's Private Sub
FillOptions() procedure.
Make the change starting at the If (rs.EOF) Then line.
Watch out for word wrap.
The code below assumes you have 3 menu pages.

Private Sub FillOptions()
......
......
If (rs.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rs.EOF))
Me("Option" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Caption =
rs![ItemText]
rs.MoveNext
Wend
If Me.SwitchboardID = 1 Then
Label1.Caption = "I'm the Forms Menu."
Label2.Caption = "I'm the forms Menu"
ElseIf
Label1.Caption = "I'm the Reports Menu"
Label2.Caption = "I'm the Reports Menu"
Else
Label1.Caption = "I'm the Queries Menu"
Label2.Caption = "I'm the Queries Menu"
End If
End If
rs.Close
Set rs = Nothing
Set con = Nothing

End Sub


The Built-in Switchboard created by the Switchboard Manager has been
called a complicated solution to a simple problem.
Why not create your own switchboard(s) using unbound forms with
command buttons?
You can have as many buttons as you wish, and if you use the command
button wizard when adding the buttons, Access will even wrote most of
the code for you. You will have more control over how the switchboard
look and works, and maintenance will be simpler.
 
B

bismuth83

Since the default switchboard code already saves your page titles (rs!
[ItemText]) in the caption variable, you can also try this: Open the
switchboard in design view, and replace the Switchboard labels with a
textbox and use "=[Caption]" as the Control Source. This will change
the heading automatically for any number of pages.



That is what I thought.  I will design my own and be able to edit as I want.
Thanks for  the quick reply.

Are you talking about the Switchboard created by the built-in Access
Switchboard Manager?
You can change some of the code in the Switchboard's Private Sub
FillOptions() procedure.
Make the change starting at the If (rs.EOF) Then line.
Watch out for word wrap.
The code below assumes you have 3 menu pages.
Private Sub FillOptions()
......
......
If (rs.EOF) Then
        Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
    Else
        While (Not (rs.EOF))
            Me("Option" & rs![ItemNumber]).Visible = True
            Me("OptionLabel" & rs![ItemNumber]).Visible =True
            Me("OptionLabel" & rs![ItemNumber]).Caption =
rs![ItemText]
            rs.MoveNext
        Wend
        If Me.SwitchboardID = 1 Then
            Label1.Caption = "I'm the Forms Menu."
            Label2.Caption = "I'm the forms Menu"
        ElseIf
            Label1.Caption = "I'm the Reports Menu"
            Label2.Caption = "I'm the Reports Menu"
        Else
           Label1.Caption = "I'm the Queries Menu"      
           Label2.Caption = "I'm the Queries Menu"
        End If
End If
   rs.Close
    Set rs = Nothing
    Set con = Nothing
The Built-in Switchboard created by the Switchboard Manager has been
called a complicated solution to a simple problem.
Why not create your own switchboard(s) using unbound forms with
command buttons?
You can have as many buttons as you wish, and if you use the command
button wizard when adding the buttons, Access will even wrote most of
the code for you. You will have more control over how the switchboard
look and works, and maintenance will be simpler.
 
K

Kogle

Thanks for the help, I will try it.

bismuth83 said:
Since the default switchboard code already saves your page titles (rs!
[ItemText]) in the caption variable, you can also try this: Open the
switchboard in design view, and replace the Switchboard labels with a
textbox and use "=[Caption]" as the Control Source. This will change
the heading automatically for any number of pages.



That is what I thought. I will design my own and be able to edit as I want.
Thanks for the quick reply.

I want to put different headings on each switchboard page. I used the
Switchboard manager to make the switchboard, but don't know how to do a
different header on each page or to format the font on each page.

Are you talking about the Switchboard created by the built-in Access
Switchboard Manager?
You can change some of the code in the Switchboard's Private Sub
FillOptions() procedure.
Make the change starting at the If (rs.EOF) Then line.
Watch out for word wrap.
The code below assumes you have 3 menu pages.
Private Sub FillOptions()
......
......
If (rs.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rs.EOF))
Me("Option" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Caption =
rs![ItemText]
rs.MoveNext
Wend
If Me.SwitchboardID = 1 Then
Label1.Caption = "I'm the Forms Menu."
Label2.Caption = "I'm the forms Menu"
ElseIf
Label1.Caption = "I'm the Reports Menu"
Label2.Caption = "I'm the Reports Menu"
Else
Label1.Caption = "I'm the Queries Menu"
Label2.Caption = "I'm the Queries Menu"
End If
End If
rs.Close
Set rs = Nothing
Set con = Nothing
The Built-in Switchboard created by the Switchboard Manager has been
called a complicated solution to a simple problem.
Why not create your own switchboard(s) using unbound forms with
command buttons?
You can have as many buttons as you wish, and if you use the command
button wizard when adding the buttons, Access will even wrote most of
the code for you. You will have more control over how the switchboard
look and works, and maintenance will be simpler.
 
K

KARL DEWEY

I did it even simpler. Always make a backup copy of database. I have had it
to lock up when I played with the switchboard butI also added more buttons
and commands.

Hide Option1 button and enlarge OptionLabel1 plus change font and color for
your 'header.'
Then change the Switchboard Items table to reflect your headers like this
(copy and paste into a Word document in landscape to see without wrap) --

SwitchboardID ItemNumber ItemText Command Argument
1 0 Main Switchboard 0 Default
1 1 Main Menu 1 1
1 2 Process Improvement Ideas 1 2
1 4 Reports 1 11
1 5 Consolidated Tool Kit && Tool List 1 3
1 6 Performance Audits 1 5
1 7 Walk Throughs 1 19
1 8 Lost Tool Activity 1 4
1 9 Process Audits 1 7
1 10 Table Update 1 6
2 0 Process Improvement Ideas 0 0
2 1 Process Improvement Ideas 1 1
2 2 Add/Update a Process Improvement 3 ProcessImprove-TAB
2 10 Return to Main Menu 1 1
3 0 Consolidated Tool Kit && Tool List 0
3 1 Consolidated Tool Kit && Tool List 0
3 2 Consolidated Tool Kit Assignments 10 CTK_Assigned
3 3 Consolidated Tool Kit - Tool Listing 3 CTK_Tool_Listing
3 4 Consolidated Tool Kit Audits 10 CTK Audit Findings and History
3 6 Add New Consolidated Tool Kit Number && Assignment 3 CTK_ORG_Assign_New
3 8 Consolidated Tool Kit Archives 3 CTK_Archives
3 10 Return to Main Menu 1 1
bismuth83 said:
Since the default switchboard code already saves your page titles (rs!
[ItemText]) in the caption variable, you can also try this: Open the
switchboard in design view, and replace the Switchboard labels with a
textbox and use "=[Caption]" as the Control Source. This will change
the heading automatically for any number of pages.



That is what I thought. I will design my own and be able to edit as I want.
Thanks for the quick reply.

I want to put different headings on each switchboard page. I used the
Switchboard manager to make the switchboard, but don't know how to do a
different header on each page or to format the font on each page.

Are you talking about the Switchboard created by the built-in Access
Switchboard Manager?
You can change some of the code in the Switchboard's Private Sub
FillOptions() procedure.
Make the change starting at the If (rs.EOF) Then line.
Watch out for word wrap.
The code below assumes you have 3 menu pages.
Private Sub FillOptions()
......
......
If (rs.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rs.EOF))
Me("Option" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Caption =
rs![ItemText]
rs.MoveNext
Wend
If Me.SwitchboardID = 1 Then
Label1.Caption = "I'm the Forms Menu."
Label2.Caption = "I'm the forms Menu"
ElseIf
Label1.Caption = "I'm the Reports Menu"
Label2.Caption = "I'm the Reports Menu"
Else
Label1.Caption = "I'm the Queries Menu"
Label2.Caption = "I'm the Queries Menu"
End If
End If
rs.Close
Set rs = Nothing
Set con = Nothing
The Built-in Switchboard created by the Switchboard Manager has been
called a complicated solution to a simple problem.
Why not create your own switchboard(s) using unbound forms with
command buttons?
You can have as many buttons as you wish, and if you use the command
button wizard when adding the buttons, Access will even wrote most of
the code for you. You will have more control over how the switchboard
look and works, and maintenance will be simpler.
 

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