Full Version: SwitchBoard
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
elliot315
Is there a way to make the Switchboard with more than 8 items?
CarlKopp
There is a few steps to adding additional fields to the switchboard. The following instructions describe how to add a ninth button.

Open the Switchboard in Design View

Drag your mouse around the last button and its corresponding label. Type Ctrl-C, then Ctrl-V to paste another button below the eighth button.

Select the newly created button object. Go to Properties, and change the Name Property to "Option9", and the On Click event to =HandleButtonClick(9)

Select the newly created label object. Go to Properties, and change the Name Property to "OptionLabel9", and the On Click event to =HandleButtonClick(9)

Go to the VBA Code window for the switchboard. Under the Private Sub FillOptions() subroutine, change Const conNumButtons = 8 to Const conNumButtons = 9

Go to your "Switchboard Items" table, and create a record for each added button. If you only have one Switchboard, the Switchboard value will always be 1. Most of the fields are self explanatory, except the Command and Argument fields. You can find a list of the "Command" values and their respective functions in the VBA window under the "HandleButtonClick(intBtn As Integer)" Function in the VBA Window for the Form Object.
elliot315
Great.. very detailed instructions THANK YOU
elliot315
oops got an error... Can not find Option 9 ???
doctor9
Personally, I prefer to create additional "sub" menus, and break up the menu items into logical groups.

For instance, my typical main menu lists options like "Data Entry Forms", and "Report Printing" and "Database Maintenance".

The Database Manager makes creating these multiple menus quite easy.

Dennis
elliot315
Yes I have done that, but one of that multiple menus requieres more items
CarlKopp
In naming the command button, did you call it Option9, or Option 9 (with a space)? The Name property must be exactly "Option9" without the space.

Also, are the additional buttons being added to the main switchboard? -- or a secondary switchboard? If a secondary switchboard, the Switchboard index number in the "Switchboard Items" table should correspond to the switchboard that you are modifying.

Also, my instructions presume that you set up the switchboard using Access's switchboard wizard
usersfirst
Another option is a switchboard/main menu that has main menu items and submenu items. It's a bit more intuitive for most users.

UI Builder for Access is free for personal use: http://www.opengatesw.com/products.aspx

Cheers,
Brandon Smith-Daigle
http://accesspro.blogspot.com
ahpitre
I have used the solution you mentioned before and it works fine. I would be nice to have the Swithcboard Manager be able to use more than 8 items per menu. The problem with the solution you mention is that Switchboard manager only allow 8, thus if you want to add more than 8, you need to enter items directly to the Switchboard table. Any ideas? Thanks for your attention, may the Lord's blessings be with you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.