Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I hide a Switchboard item?

Posted on 2008-10-07
7
Medium Priority
?
263 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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