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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Switchboard 1

Status
Not open for further replies.

bwedmund

Technical User
Oct 29, 2000
17
US
Is there a way to add more than 8 items on a switchboard page. I am getting this message when I try to add more than 8 items -- Sorry, only eight items are allowed per switchboard page.

Also can I exit my switchboard to windows desktop?

Thanks
Barry
 
Hi Barry,
The answer is yes to both of these
First to allow more than 8 items you need to change the following part of the switchboard's code

Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const ConNumButtons = 8


Change the ConNumButtons value to the number of buttons you want. You will then need to copy a option button and optionlabel and paste them in for each extra button you want (remeber to change the name of them so they are labelled option9 optionlabel9 etc).
Now to add the extra options to your switchboard you need to insert a line into your switchboard table that has SwitchboardID value set to the page you want it to appear on and ItemNumber set to 9 or 10 etc depending on what number button it is.
You can edit the items added in this way with the switchboard manager. The only thing switchboard manager stops you doing is adding any options above 8.

In answer to the second question change the HandleButtonClick function so that

Case conCmdExitApplication
CloseCurrentDatabase

instead reads
Case conCmdExitApplication
docmd.quit


I hope this helps and don't hesitate to ask if you have any questions regarding this.
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top