Sure! A switchboard is just a pre-designed form. You can go into Design View for your switchboard and work with it like any other form! Select the Option Button and Option Button Label, right click, copy then paste. When you do this on a form copying a control, the copy of the control usually disappears! To make it appear, after you hit Paste, hold down <Control> then use your <Down Arrow> and <Right Arrow> to bring the copied contol down onto the form and into place.
Many thanks for this advice.
I have managed to copy the button and label in design view and paste the new item on the page.
When I go to form view though, this new button and label do not appear.
I have changed the visible option to Always, but still nothing.
I also presume that I have to change the onclick properties from =HandleButtonClick(8)(the button I copied), to =HandleButtonClick(9) as it is a different button?
Could you also tell me how I add the new event procedure or code to make the button open a form/report, as the only thing that appears in the expression builder for the other buttons is =HandleButtonClick(8)
OK, I've figured out the steps. Change the properties of the new button and label as follows:
Button:
On Click =HandleButtonClick(9)
Name = Option9
Label:
On Click =HandleButtonClick(9)
Name = OptionLabel9
Now go into the VB code for the form.
Look for the FillOptions() subroutine, change Const conNumButtons = 8
to Const conNumButtons = 9
Finally, you need to make an addition in the SwitchboardItems table. Open this table, and add a new record setting the fields as follows:
SwitchboardId = 1 (assuming this is on the first switchboard)
ItemNumber = 9
ItemText = (whatever text you want to see next to the button)
Command = 3 (that tells it to open the form for browsing, if you would rather open for add-only, set this to 2)
Argument = (the name of the form you want to open)
You may need to change the size of the Switchboard to see your new button (if you maximize the form than that is not a problem).
Thanks JoeAtWork for this insight into how to be creative with the switchboard, it works an absolute treat, and taking this process into consideration means that any number of buttons can be added to the one switchboard - brilliant
Thanks for the star. The one problem is this migth make Switchboard Manager unuseable, because it's probably hard-coded to expect only 8 buttons per form (haven't tried it, though).
In the VB code for this form you need to update the Filloptions() sub. The variable is called conNumButtons. I have altered my switchboards to double the number of items on them. I always edit the switchboard table manually to add new menu items.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.