Switchboard buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is is possible to have more than 8 buttons on a switchboard? And if so, what
would the code look like?
 
Help says no and I've never tried to violate that rule.
Instead I developed a form with buttons and if you just
want to open another form try in the click event:
DoCmd.OpenForm FormName:="Form2"
Me.Visible = False

In the Form2 close event do:
DoCmd.OpenForm "frmSwitchBoard"

Geof.
 
Is is possible to have more than 8 buttons on a switchboard? And if so, what
would the code look like?

You're talking about the switchboard created by the switchboard
manager add-in?
Yes you can, but why would you want to?
You can add additional buttons, but you cannot edit their function
using the manager.

A better solution would be to use one of the 8 buttons to open a
second switchboard.

The best solution would be to create your own switchboard using an
unbound form. You can then add as many command buttons as you wish.
You will have more control over flexibility, maintenance and
appearance. If you use the command button wizard to add the buttons,
Access will write most of the code for you.
 
Michael Dane said:
Is is possible to have more than 8 buttons on a switchboard? And if so,
what
would the code look like?

Yes, I do it all the time. First, use the Wizard to create a switchboard
with just 8 items, then edit the form to add more buttons and change the
label names and button names to conform to the Wizard-established pattern.
Now edit the code associated with the switchboard form.

In SUB FillOptions change this line:

Const conNumButtons = 8

Change that number to be the actual number of buttons you have.

Edit the Switchboard Items table to add your new items. It sounds like a
lot more work than it actually is. Once you do it a couple times, it's
second nature and certainly easier than doing it from scratch.

Tom Lake
 
Switchboard Manager won't allow you to enter more than 8 items per
switchboard. Also the MS Access-provided switchboard form only has 8
menu buttons. So if you want to add more than 8 switchboard items,
you'll need to update the "Switchboard Items" table manually, use a
different switchboard form (or modify the Access-supplied one), and
update the "FillOptions" subroutine.

When you add buttons to a switchboard form, the buttons should be
named "OptionN" and the label should be named "OptionLabelN", where
"N" is the button number.

With regard to the code changes, the FillOptions routine constant

Const conNumButtons = 8

.... can be changed to the number of buttons on your switchboard form.

If you're looking for more switchboard features, you may want to have
a look at our "A Better Switchboard" add-in for MS Access. More info
is at http://www.peterssoftware.com/abs.htm

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
 
Back
Top