Why can I not create a switchboard with more than 8 buttons?

G

Guest

I have created a database with switchboards. I navigate the database by
clicking buttons that lead to other switchboards until I get to the
form/query that I need. The problem is that I cannot put more than 8 buttons
on my main switchboard. I could create forms that will navigate the
database, but the switchboard is the most convenient way to do it. Is there
any way to create a switchboard with more than 8 buttons?
 
G

Guest

Hi Phil,

you could increase the number of options by copying the object for one
option already in your switchboard (e.i.: Select all Option 8 objects and
copy/paste them). Pay attention to change the name in order to follow the
pattern :

Option9, OptionLabel9 (for example)

Also pay attention at the events, you need to change the parameter on them:
=HandleButtonClick(9)
=HandleFocus(9)

In the code, your need to change the constant with the number of buttons:
Const conNumButtons = 9

I didn't try it, but I think that is all.

Obs.: Usualy, if you need more than 8 option within a menu, it means it is
overpopulated and you could (and should) create a submenu for it but, it is
your call. :)

Take care
Mauricio Silva
 
J

Jeff Conrad

Hi Phil,

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.
 

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