Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard 2

Status
Not open for further replies.

ecannizzo

Programmer
Sep 19, 2000
213
US
I have a switchboard. When I try to add more than 8 menu items, it tells me I can't do that. But there is no way for me to split these items up. Is there any way that I can add more menu items to the switchboard?

Thanks!
Erica
 
Erica

1. On the switchboard form, copy and paste the extra buttons and labels.
2. On the first new button, change the button name to Option9 and the label to OptionLabel9. repeat this for all the extra buttons.
3. On the 9th button's "OnClick" event, change =HandleButtonClick(8) to
=HandleButtonClick(9). Repeat for all other new buttons.
4. On the new labels, do the same.
5. In the switchboard's VBA Code, go to the FillOptions() procedure and modify the value of the constants to the new number of buttons.
6. Go to the Switchboard table and enter the appropriate data for each of the new buttons.

That should do it.

Thanks to Jim Lunde, who helped me with this when I need to do it!

Lightning
 
Hi Erica,
Lightning's method is perfect however you must be prepared to give up the typical Tools-Addins-Switchboard Manager method of entering your information past the 8th item. One other drawback that packs along with the switchboard is its table design. In the database world it's structure is considered to be poor and awkward to manipulate...so as you will now have to do any entries or edits that are beyond the 8 maximum in the Manager directly in to the table, you will have to study the tables layout carefully.
If you use Access 2000 depending on just how many controls you really want/need per switchboard I would offer a solution which would be a single simple form with lots of labels on it and each of these labels forecolor a nice bright blue and underlined. Why that looks just like a hyperlink! Using the Hyperlink subaddress property you can addess objects in your database by typing in like:
Form Customers
which would open the form named customers. A real plus to this setup is that the form is called a lightweight and requires no module behind it. It loads in an instant, can be maintained in design view and not through a table.

For both 97 and 2000 you may consider the "Treeview" control which I'm sure you have seen if you ever used your Windows explorer. This is much more complicated than the switchboard idea but leaves you with an infinite number of "nodes" that can be displayed in a real logical fashion with nifty icons and text.
It is by no means an easy task to get it up and running, however the results are fantastic, and even though it may contain a thousand "nodes" and fifty branches, it is just one object on the form, so when analyzed, your form stays "happy". All just food for thought...! Gord
ghubbell@total.net
 
That sounds good, but how do I make a label, when clicked on, go to a report or form?

Thanks!
Erica
 
Hi Erica,
Sorry for the slow reply. If you ask then I'll assume you are using 2000, with the hyperlink Sub Address property:
With the form in design view, select label from the toolbar, drag out its position and type something into it right away or else it won't "stick". If you double-click on it you'll see its "properties dialog" popup. Select the format tab. Find the property "Hyperlink sub address" and type in to it like: Form Customers (if you want to open a "form" called "Customers"). Because you choose a hyperlink address, by default it will make the underline and color just like other hyperlinks you see when you use say, Internet Explorer. Change this to anything you would like or simply leave it.

A really fun option to this is to use images in place of labels. Although they "weigh down" the form quite a bit, you can use them to graphically indicate things, which is a really wise idea if you have any multilingual issues where you are. Drag an image out onto the form , follow its dialog to select an image from somewhere in your computer, and then continue as above! Good luck and write back if you need any more help...I marked the thread this time. :) Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top