8 items per switchboard page limit

R

Rob F

Does anyone know if it is possible to change (increase)
the number of items that can be placed on a switchboard
page? I have 9 items I want to use but whenever I try to
add the last one I get the message from the Switchboard
Manager 'Sorry, only eight items are allowed per
switchboard page'. I have tried changing the code from:

Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const conNumButtons = 8
etcetera...

To:
Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const conNumButtons = 9

but I still get the same error. For that matter I cannot
even figure out where that particular error message is
generated from.

I really do not want to have to create a sub-switchboard
for just one item if I can avoid it. Any help would be
greatly appreciated.

Thanks in advance,
Rob
 
L

Lynn Trapp

The Switchboard Manager will not accept more than 8 items and there's
nothing you can do about that. You can do what you want but it takes quite a
bit more than changing conNumButtons to = 9. You also need to add another
command button and give it the name Option9. You need to add the following
to the Click event of that button -- = HandleButtonClick(9). Then you will
have to manually insert a record in the Switchboard Items table to do what
you want clicking that choice to do.
 
J

Jeff Conrad

Hi Rob,

Follow these steps to add more than 8 items to the Switchboard Form:
Do this on a backup of your database first!

1. You need to create additional command buttons and labels
to match the number of items you want. Easiest way to do
this is to highlight the last command button and label and
select Copy. Then Paste them onto your form to create
additional ones. Now make sure you change the name of the
NEW command button(s) to Option9, Option10, etc. Also
change the name of the NEW labels to OptionLabel9,
OptionLabel10, etc.

2. Now go to the properties area of each new command
button. In the click event, enter the following:
=HandleButtonClick(9), =HandleButtonClick(10), etc. to
match up with your selection. Do exactly the same thing
for the Click event of the labels (unless you turned those off).

3. Now go to the code behind the Switchboard form. Scroll
down until you come to this line in the FillOptions Sub:
Const conNumButtons = 8
Change that number to 9, 10 or whatever you need.

4. Compile the code, save and close the form.

Now if you use the Switchboard Manager interface you are
still restricted to 8 items. To add more you have to add
the entries manually into the Switchboard Items Table.
Shouldn't be hard to do if you take a few minutes and see
how the records are entered. You can EDIT more than 8
entries from the Wizard, but cannot ADD more than 8.

The forms you see displayed are actually from one of the
wizard libraries on your system. You cannot change these
forms and code so you are limited to what the original
developers created. If you really start requiring more control
and/or complexity, then it is time to build your own
Switchboard-type main form.

I have an Advanced Switchboard Manager that will allow
up to 12 entries using the interface, but it only works on
Access 97 at the moment. I'm having some difficulty
making it work for later versions due to one small problem.
 
F

fredg

Does anyone know if it is possible to change (increase)
the number of items that can be placed on a switchboard
page? I have 9 items I want to use but whenever I try to
add the last one I get the message from the Switchboard
Manager 'Sorry, only eight items are allowed per
switchboard page'. I have tried changing the code from:

Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const conNumButtons = 8
etcetera...

To:
Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const conNumButtons = 9

but I still get the same error. For that matter I cannot
even figure out where that particular error message is
generated from.

I really do not want to have to create a sub-switchboard
for just one item if I can avoid it. Any help would be
greatly appreciated.

Thanks in advance,
Rob

Adding a 9th or 10th etc. button is no problem, hoewever you cannot
edit the extra buttons using the switchboard manager. Any changes on
those buttons will have to be done manually.

Here's how.

In design view, select the 8th button. Copy it. Paste it.
Drag this new button and label and align it under the others.
Name this button "Option9".
Change the button's Click Event to:
=HandleButtonClick(9)

Rename the attached label"
OptionLabel9
Change it's Click event to:
=HandleButtonClick(9)


Open the switchboard code window and change
Const conNumButtons = 8
to
Const conNumButtons = 9

Close the code window and save the changes.

Open the SwitchboardItems table

Add a new record.
The actual data depends upon what you want the new button to do.
Let's say you wish to open a form for editing.

SwitchboardID = 1
Item Number = 9
Item Text = Open form whatever (this is the label text)
Command = 3 this is the constant number to open a form for editing)
Argument = frmWhatever (this is the actual name of the form)

Add additional buttons using the same method.

Change SwitchboardID to whatever the actual Switchboard number is.

Again , you won't be able to use the manager to edit the additional
button. You'll need to do it in the SwitchboardItem table.
 
L

Larry Linson

Does anyone know if it is possible to
change (increase) the number of items
that can be placed on a switchboard
page? I have 9 items I want to use but
whenever I try to add the last one I get
the message from the Switchboard
Manager 'Sorry, only eight items are
allowed per switchboard page'. I have
tried changing . . .

You've identified the problem right there -- Switchboard Manager. So, I
suppose it is due time for me to repeat my comments on that subject -- the
Switchboard Manager is a complex solution to a simple problem which makes it
difficult to follow what is being done, and, as you have discovered,
difficult to change. We see enough people asking questions here about their
difficulties with Switchboard Manager for me to believe it causes more
problems than it fixes. I have not figured out why Microsoft thought it
useful to add that wizard to the product, nor, once they did, why they chose
to implement it in the way they did.

I can't speak for others, but I have always found that creating my own
switchboard using unbound forms and command buttons, even if I needed a
"hierarchy" of unbound forms, to be a simple, straightforward process,
flexible (e.g., if I needed some criteria to be entered for a report
selection, I was free to add those to my own forms), and clear when the time
came to maintain or enhance. I've never suffered even a little for lack of a
table in this process.

Larry Linson
Microsoft Access MVP
 
M

Mike Painter

Larry said:
I can't speak for others, but I have always found that creating my own
switchboard using unbound forms and command buttons, even if I needed
a "hierarchy" of unbound forms, to be a simple, straightforward
process, flexible (e.g., if I needed some criteria to be entered for
a report selection, I was free to add those to my own forms), and
clear when the time came to maintain or enhance. I've never suffered
even a little for lack of a table in this process.

Absolutely. You can also arrange buttons anyway you want and group them
according to functions
 
R

Rob F

Thank you to all those who responded. You have certainly
answered my questions & given me something to think about
and maybe even work on in my 'spare time'. ;)

Thanks again,
Rob
 

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