Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard (2000)

    I am trying to add a button to the switchboard. I have the following instructions:
    Add a label OptionLabel9 and a button Option9.
    Set their click event procs to =handlebuttonclick~(9) - This is the part I don't understand - I went in to the click event and put =handlebuttonclick~(9) on the the click event for the button and label and I get an error.

    Change the constant in FillOptions sub from 8 to 9 - I understand this part.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Switchboard (2000)

    The tilde doesn't belong in there. You should set the On Click event to

    =HandleButtonClick(9)

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (2000)

    I added the code without the tilde and the equal sign. Now when I go to use the 9th button on the switchboard, I get an error message - "Sorry, only eight items are allowed per switchboard page. Is there somewhere else in the code behind the switchboard I have to change or do I have to create another page to my switchboard?

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (2000)

    Linda: I asked Microsoft the same question a few years back and received this reply. I didn't use it; I created another page instead. HTH.

    When you use the built-in Switchboard Manager to create your
    switchboard, there is a limitation of 8 option buttons per switchboard
    page. This is a built-in limitation to the wizard and modifying the code of that wizard is not supported.

    However, instead of using the Wizard to create your switchboard, you can create your own switchboard since a switchboard is also a form in fact. For example, let's assume you want a button to open a form. On the On Click event of the button you would have code similar to the following:

    DoCmd.OpenForm "Your Form Name", acNormal

    If you are curious about how to have more than 8 buttons per switchboard page, you can perform the following steps to test:

    I assume that you have a main switchboard form named "switchboard" in
    your database.

    1. Back up the database first.

    2. Open the "switchboard" form in design view.

    3. Add the ninth button named "Option9" and in the "On Click" event
    property sheet input "=HandleButtonClick(9)".

    4. Add the ninth label named "OptionLabel9" and in the "On Click" event
    property sheet input "=HandleButtonClick(9)". Also, set its "caption"
    property to "command9"

    5. Save the changes and then open VBE by press ALT+F11.

    6. Find the underlying VBA module of "switchboard". Its name should be
    "Form_switchboard".

    7. In this module, find the FillOptions() procedure. Then, change the
    code below
    From Const conNumButtons = 8
    To Const conNumButtons = 9
    8. Compile and save the changes.

    9. Now, you can add the ninth option directly to the "Switchboard Items" table. Note: you are still not allowed to new the ninth switch-board item through Switchboard Manager.
    For example, if the record of "option 8" is:
    SwitchboardID ItemNumber ItemText
    1 8 command 8

    Then, add a new record like below:

    SwitchboardID ItemNumber ItemText
    1 9 command 9
    Save the changes.

    10. Open Switchboard Manager, you will note the command 9 is in the
    switchboard item list. Then, you can set the operation for the "command
    9" switchboard item.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Switchboard (2000)

    I'm with Bill on this one - we actually did this for a client who insisted on it - they wanted up to 12 buttons on the switchboard. But we said "No Way!" to modifying the wizard so you could administer the menus, and they had to do all that by manually changing the switchboard table. It's much simpler to break it up into submenus.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •