Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard Image (2000 SR-1)

    I've got a switchboard set up with three different menus. Is there any way to change the image or text that displays with each menu? I want to assure the user that they are in the right place.

    Thanks,
    Bob

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

    Re: Switchboard Image (2000 SR-1)

    Is this a switchboard created with Tools | Database Utilities | Switchboard Manager, or some other design? If the latter, can you tell a bit about how it works?

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Switchboard Image (2000 SR-1)

    Are you using a switchboard built with the switchboard manager? If so, it is really only one form with the label captions changed for the "page" and unused controls hidden as necessary. If by image and text, you mean the graphics and labels on the switchboard itself, you would have to do it in code based on the SwitchboardID value of that page.
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard Image (2000 SR-1)

    There's a main switchboard with buttons for Reports and Reference switchboards (as defined in the Switchboard manager). The same heading displays on each switchboard. Using the SwitchboardID value in the Switchboard Items table seems to make sense. Are the fields in the Switchboard Items table standardized?

    Thanks,
    Bob

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

    Re: Switchboard Image (2000 SR-1)

    OK, I gather you are using the switchboard created by the Switchboard Manager. This form uses the Switchboard Items table; this table has a fixed structure. You could add a field to it to store the name of the picture for each switchboard, but to keep things simple, you can do everything you need in the code behind the form.

    Before doing that, open the Switchboard Items table. Look for records whose ItemNumber value is 0. The ItemText value for these records is the name of the switchboard page. You will need to know the relation between SwitchboardID and ItemText for these records, e.g. SwitchboardID = 1 corresponds to ItemText="Main Menu" etc.

    Open the Switchboard form in design view, then select View | Code.
    Scroll down until you see the HandleButtonClick function. This function is invoked when the user clicks an item in the Switchboard form.
    The part that switches between different switchboard pages is:

    ' Go to another switchboard.
    Case conCmdGotoSwitchboard
    Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]

    Add the following code below those lines, and adapt it to your situation:

    Select Case rs![Argument]
    Case 1
    Me.Controls("Picture").Picture = "C:AccessOne.gif"
    Case 2
    Me.Controls("Picture").Picture = "C:AccessTwo.gif"
    ' add more Cases if necessary
    End Select

    Note: the caption of the Switchboard form changes as you move to another switchboard page.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Switchboard Image (2000 SR-1)

    Could you do the following:
    Me.Controls("Picture").Picture = rs![Argument]

    and setup the picture addresses in the Argument of the switchboard table, as long as the Argument field in the table is text.

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

    Re: Switchboard Image (2000 SR-1)

    That is problematic, since the Argument field is also used to specify the default switchboard page. You could, however, add an extra field to the Switchboard Items table, and use that to store the paths and file names of the images. The Switchboard Manager doesn't mind, as long as you don't change the definitions of the existing fields. You will have to enter the paths manually, for the Switchboard Manager won't expand itself to accomodate the extra field...

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Switchboard Image (2000 SR-1)

    SwitchboardID is the field that identifies the "switchboard menu" you're looking at.
    Charlotte

Posting Permissions

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