Solved

How do I hide a Switchboard item?

Posted on 2008-10-07
7
212 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
  • 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now