Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Location
    Florida, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboards in Access (2000)

    I am trying to modify my switchboard to use a different title on the different pages of the switchboard. In other words, the main switchboard text at the top says Custom Department Forms, and one of the entries on this switchboard, takes the user to another page in the switchboard where they can pick from several reports. On this page, I would like to have it say Custom Department Reports (instead of Forms), but I can't figure out how to do this anywhere...Anyone tried or done this successfully

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    Unfortunately, the 'built-in' Switchboard function does not allow you to do what you want to do. To have custom switchboards for different 'areas' of your DB application, you must create custom Forms, representing switchboards, for each of the desired areas. These Forms, which could be customized as desired, would be populated with button controls that are programmed to open another form, print a report, return to the previous form, etc.

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

    Re: Switchboards in Access (2000)

    If you use the standard switchboard that Access creates from Tools/Add-ins, you can tinker with it (within certain limits). By default, the title of the switchboard page is displayed in the caption of the form (in the title bar of the form).

    If you look at the code behind the switchboard form, you will find something like

    Private Sub Form_Current()
    ' ...

    Me.Caption = Nz(Me![ItemText], "")
    FillOptions

    End Sub

    (this is what it looks like in Access 97)

    Replace this by

    Private Sub Form_Current()
    ' ...

    Label1.Caption = Nz(Me![ItemText], "")
    Label2.Caption = Nz(Me![ItemText], "")
    FillOptions

    End Sub

    Then the "shadowed" text above the buttons will reflect the title of the switchboard page.

  4. #4
    Lounger
    Join Date
    Mar 2002
    Location
    St Albans, Hertfordshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    There is a much easier way to tinker with the switchboard - All entries in the switchboard are stored in a table called Switchboard Items.

    There are five columns to this table:
    SwitchboardID - The num,ber of the Switchboard
    Item Number - The order of the items within the switchboard
    Item Text - The display text/caption for the item
    Command - The action to be carried out
    Arguement - The reference to the item that the action is to be carried out upon.

    If Item number = 0, then this is the caption for your Switchboard - just edit the Item Text field accordingly, so if you left the Main Switchboard as is, then this is likely to be the very first item in the table (the primary key is a combo of SwitchboardID and Item Number

    Just make the necessary changes, and close the table.

    <big>Important Reminder: Copy the Switchboard Items table to ensure you have a backup copy first, just in case you make a mistake!</big>

  5. #5
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    Chris,
    That idea is fine but the text only shows up in the title bar. I would like a label to appear under the main database menu as the first post asked meaning. The main database is the Machine Parts Database. That now shows all the time. When I switch to Reports Switchboard Page, I'd like it to say under the "Machine Parts Database", "Reports Menu". Can your idea do that?
    Deb

  6. #6
    Lounger
    Join Date
    Mar 2002
    Location
    St Albans, Hertfordshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    Deb - sorry about that - Icompletely misunderstood.

    In that case, if the solution that Hans offered is enough, then go with that - if you want to create switchboards for varous areas of the business, or for dirfferent user types, then I would take the existing switchboard functionality, edit it the way that Hans suggests, then do the following:

    1 - create a query, based upon the current switchboard items table - temporarily call this 'switchboard items_1'
    2 - add a new column to the switchboard items table, and call it group - rename this table to 'Switchboard Items Source'
    3 - change the primary key on this table to include this new 'Group' column
    4 - rename the query to 'Switchboard Items' - add then new column to this query, and use this as your filter

    for example - user group 'Users' may have different access rights to user group 'Admin' - setting these up as groups allows you to define different options for each group, as well as shared options for them too

    All you need to do finally, is set a public variable after the user logs on, determining what group they belong to - this variable value then feeds the where clause in your new query

    If I have time, I'll knock up a quick demo for you

    I hope that helps you get where you are going.

    Kind regards

  7. #7
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    Butting in I know.

    Have a look at the attached switchboard, it should do just what you want. It uses the standard switchboard table. On the main menu only the invoicing and maintenance options have sub menus.
    Attached Files Attached Files

  8. #8
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboards in Access (2000)

    Nice switchboard. Hans, suggestion works great and all I had to add was 1 line to the code and an extra label. I added another label named is whatever and that was my text "Machine Parts Database", another label name Label1 and added the line Hans suggested and when I switch to different swithboard pages, that label changes. Very smooth.

    Thanks
    Deb

Posting Permissions

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