Solved

How do I hide a Switchboard item?

Posted on 2008-10-07
7
236 Views
Last Modified: 2012-05-05
Dear Experts,

I have a Switchboard menu that includes an item that is restricted to system administrators only.  Users login to the application but all see the same menu.  Currently, I require a password to access this particular menu obtion - but was wondering if there is any way to hide a switchboard item.

Thanks for your help,
Jeanne
0
Comment
Question by:aeolianje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22659156
When a user logs in, is there anything that identifies that usert as an Administrator?  

Do you have a table of users, along with some representation of their password - best if it encrypted, and not plain-text?

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22659205
I once had an application with precisely the conditions that you are describing - A set of 'Administrator Only' functions, accessed via the Switchboard - and visible only to Administrators, after they had 'logged in' via a User Login on the Switchboard..  But I had a Users table, which held the User login and encrypted password, along with the functional category of the user (ADMIN, GENERAL, CLERK for example) and could then control which features were exposed (made visible) based on user Category.

AW
0
 

Author Comment

by:aeolianje
ID: 22659497
AW,

Yes - I do have a user table.  It was origianlly set up so that we could restrict certain forms.  This will be the first time we use this function - but it will be to restrict Switchboard options.

I could simply display a message based upon the user category -- but was hoping to hide the Switchboard item altogether.  Is there something that I can do when assessing the 'handlebutton'?

Thanks,
Jeanne
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 250 total points
ID: 22660233
Once the user has successfully logged on, you make the various Buttons on the Switchboard Visible or Not based on the Category/Privilege of the user.

Either like this

If User.Category = "ADMIN" then
    cmdButton!.Visible = True
    cmdButton2.Visible = False
ElseIf User.Category = "GENERAL" Then
    cmdButton1.Visible = False
    cmdButton2.Visible = True
End If

or like this (your choice)

 Dim AdminVisible as Boolean
 Dim GeneralVisible as Boolean
 Dim ClerkVisible as Boolean

'only one of these can ever be true
AdminVisible = (User.Category = "ADMIN")
GeneralVisible = (User.Category = "GENERAL")
ClerkVisible = (User.Category = "CLERK")

cmdButton1.Visble = AdminVisible  'only visible to ADMIN
cmdButton2.Visble = GeneralVisible ' Only visible to General user
cmdButton3.Visble = AdminVisible OR GeneralVisible ' visible to BOTH ADMIN and GENERAL


AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22673348
I added a separate button, to allow the user to login, which was NOT part of the normal Switchboard - hence did not work with HandleButton.  All of the other controls/buttons on the SwitchBoard main menu were initially invisible.  Then, in the Button_Click event handler for the Login Button and based on the category of user, make the necessary buttons visible, and deal with the switchboard in the normal manner.

AW
0
 

Author Closing Comment

by:aeolianje
ID: 31504635
Thanks for your help!

This will work fine.  It does not show the Switchboard option.  It does leave a blank link but that should not be a problem for the user.

Thanks again,
Jeanne
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22679557
GLad to be of assistance.

AW
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question