Question Access 2007 Switchboard More then 8

xirokx

Registered User.
Local time
Today, 07:06
Joined
Jun 28, 2009
Messages
47
Hi There,

Firstly I am close to completing my first ever access database in Access 2007

Unfortunately I discovered you cannot add more then 8 items to a switchboard.

Having Googled the problem, I found the following solution:-

. Q: How do I have more than eight items on the switchboard form?
A: Make a backup of your database before beginning. 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.

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).

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.

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.

But I cannot work out how to get past this part of the above, I just cannot find it:-

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.

I would really be grateful for some assistance to understand how to " go to the code behind the switchboard form" ?? Remember I am using Access 2007

Also please note my switchboard currently has 8 items in there I just need 2 more buttons....

Thanks in advance...

Cheers
 
1. you can add an 8th option which opens another switchboard for the additional items.

2. I hate the limitations of switchboard forms so do what I do - create your own form for the interface. Chances are you can create a better looking one than the switchboard (ugly) and that has the functionality you want. Yes, you can't just use a wizard to add things but hey, this is Access development, not just connect the dots :D
 
I don't use switchboards either, but if you want to follow the directions, go into the VBA editor, Edit/Find, click on Current Project, and search for conNumButtons. You should find that line.
 
I hate the limitations of switchboard forms so do what I do - create your own form for the interface.

how do I link the buttons though? Remember I am a total newb?

Do I just add a button and then use the options available from the wizard?

Finally how do make that form open up when the end user runs the database?

Please advise..

thanks for your help
 
I don't use switchboards either, but if you want to follow the directions, go into the VBA editor, Edit/Find, click on Current Project, and search for conNumButtons. You should find that line.
The find option is greyed out...

Any ideas why?
 
Make sure focus is somewhere in the code window.
 
When I open the database, then go to the code view in VBA there is no code anywhere...its completely blank...are we talking about the same thing?

please advise

cheers..
 
When I open the database, then go to the code view in VBA there is no code anywhere...its completely blank...are we talking about the same thing?

please advise

cheers..

As it is 2007, it probably isn't using code, but embedded macros. And, make sure you have a trusted location set.

I don't have 2007 with me to test.
 
And just an observation -

In the time it is taking to solve the "switchboard" problem (yuck!) you could have built your own form and been on your way.
 
I hate the limitations of switchboard forms so do what I do - create your own form for the interface. Re: building your own form to act as a switchboard, how do I link the buttons to reports and queries? Remember I am a total newb? Do I need to know VBA?

Do I just add a button and then use the options available from the wizard to open and edit forms?

Finally how do I make the form I create open up when the end user runs the database?

Please advise..

thanks for your help
 
I hate the limitations of switchboard forms so do what I do - create your own form for the interface. Re: building your own form to act as a switchboard, how do I link the buttons to reports and queries? Remember I am a total newb? Do I need to know VBA?

Do I just add a button and then use the options available from the wizard to open and edit forms?

Finally how do I make the form I create open up when the end user runs the database?

Please advise..

thanks for your help

When you add a button, your control WIZARD should pop up and give you all the options you will need to select what you want to do.
 
thank you very much guys I will create my own form and add buttons manually...

cheers!!

will let you know how I get on
 
despite what others have said I use the builtin switchboard manager for virtually all my apps - with no problems at all

i have 17 buttons - 1 column of 9, 1 of 8, numbered horizontally so button 17 is the last on the left column and is always used for "return to previous menu"

have you done this yet?

if not, just add extra button/label pairs to your form, to suit

name the buttons and labels consistently with the other buttons/labels
look at the click events for the buttons/labels - name them consistently with the others

so button 15 click event becomes =HandleButtonClick(15)

NOW, in the programme just change the button number constant from 8, to 13, 15 or whatever value you need. (ie - the number of buttons you have) The code only checks buttons up to this number, so it will ignore any numbers out of range.

One final point - make sure you do use BUTTON 1 on every menu page. You can leave gaps anywhere else.


the thing about the switchboard manager is that it works on a hierarchical menu, straight out of the box
You can have 100's of menu options, all of which can be accesses in a logical manner, and you can redesign your menu layout, simply by editing the "switchboard items" table.

If you design your own menu form, (unless you use this sort of technology!) you are limited to finding a way to put all your options on a single form.
 
Last edited:
I have 8 buttons on my switchboard

I have even changed the onclick and event commands in properties

But I cannot get the code for it, this is the part I really need some help with:-

NOW, in the programme just change the button number constant from 8, to 13, 15 or whatever value you need. (ie - the number of buttons you have) The code only checks buttons up to this number, so it will ignore any numbers out of range.

Please help me access the code, I tried in the VBA part of access but still cannot do it...

How do I do it so I can change the line from 8 to 15 or whatever I need?

Please help

Thanks
 
This is a different option rather than a solution...create your own switboard...basically its a form with a lot of buttons that can take you where ever you want and at the same time you can customize it...


Just a thought..
 
I recognize the instructions you posted; they are from a previous post of mine in years past.

I have instructions for adding more than eight items to the Switchboard in versions of Access pre-2007 here:

http://www.accessmvp.com/JConrad/accessjunkie/switchboardfaq.html

For Access 2007, it's even easier than you think.

I've created a brand new FAQ page on my site just for you:

http://accessjunkie.com/faq_58.aspx

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 
Call me old fashioned but I like Menus. You have complete control over them and if you need another Menu - you just make another. If you need another Button, you create another button.

Whatever version of Access you use, you can unify your application and make your User Interface consistent. Forget drop-down Menus, ribbons or switchboards.

If you want to add a logo just create a subform and plant it on every Menu Form.

Simon
 
access junkie et al.....

I fail to see how you have clearly explained step by step how do add more then 8 items to a switchboard menu???????

All I need help in doing is changing the preset 8 to 15 but do not know where to click to get change this preset??

If anyone could please write me a quick step by step guide to follow in access 2007 I would be grateful...

Currently I am going round in circles and not getting anywhere despite your best efforts...

I really would like to complete this database A.S.A.P but am receiving part instructions that are prohibiting me from doing so...

So please could someone I kindly repeat write a step by step guide how to change the "preset code" in switchboard manager from 8 to 15?

Thank you very much all for your time and patience..
 
Did you take a look at the new FAQ page I created to explain this?

Here it is again:
http://accessjunkie.com/faq_58.aspx

I thought the instructions were pretty clear, but let me try again.

1. Don't change anything about the Switchboard form. Meaning, don't add any more controls to the form and don't try and modify any of the embedded macros attached to the form. Leave the form alone.

2. If you want to use the Switchboard Manager to **add** more than eight items, you can't. The wizard is hard coded to reject more than eight. There's no way to change that. You can, however, use the wizard to edit more than eight if you manually put in more records into the Switchboard Items table.

3. To have more than eight items, you **must** close the wizard and add the records you need manually to the Switchboard Items table.

I think you're confused on the third point, so let me explain further. The Wizard simply is a tool for adding, editing, and deleting records from the Switchboard Items table. Close any objects you have open and then open the Switchboard Items table in the Navigation Pane in datasheet view.

Now take a close look at the records. What do you see?
You'll see these five fields:
SwitchboardID - This is the ID for each menu or page in your switcboard
ItemNumber - This is the display order of each item on a specific page
ItemText - This is the text displayed on the menu for each item
Command - A specific number that Access uses to do "something"
Argument - This is used by some commands to know what object Access needs to work with.

The Switchboard Wizard simply helps you organize these records. The Switchboard form reads the information from this table and displays it on the form.

So to have more than eight items on a menu page you have to do this manually. You'll need to take a few minutes and study the records in your table. Trust me, after you look at the records for a little bit, it will all make sense.

Here's a quick example.
Say you have these records in that table for the first menu page:
1 0 Main Switchboard Null Default - This is the name of a menu page
1 1 Open a form 3 Form1 - This will open Form1 in Edit mode
1 2 Open Form2 3 Form2 - This will open Form2 in Edit mode
Etc.
Etc.
Follow me so far?
To make a nineth option for this page just create a new record like so:
1 9 Open Form9 3 Form9 - This will open Form9 in Edit mode

That's all you have to do.

When you open the Switchboard form and navigate to that menu page, you'll now see nine options instead of just eight.

Make sense?

Now if you open the Switchboard Wizard you'll see this nineth option listed. You can shuffle the order with Move Up and Move Down, you can edit the command, and even delete it. However, if you press New on that page, the Wizard will still prevent you from adding more than eight.

Does that help explain it better?

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 

Users who are viewing this thread

Back
Top Bottom