Switchboard option visibility based on Environ("username")

Local time
Today, 04:23
Joined
Feb 25, 2008
Messages
410
Just wondering if anybody had ever thought about how to make certain switchoard options invisible to certain users based on their Environ("username") variable?
 
Yeah, very simple really. In the form's On Open event you can do the assignment. What do you need help with?
 
Well, on my switchboard (page 1), I have selections for different positions; customer service, supervisor, operations & administrators. I already have a table in another database that has each persons position and I'll add a new field to it that has each person's winlogon.
I was thinking about making some options invisble to certain people; i.e. A customer service representative would have no reason to go into the Operations page so it should just be invisible.

Now, I should say that the options inside the operations page are secured anyway, but my supervisor had this idea, and I told him I'd look into it, so...

What do you think Bob?
 
I actually like not showing someone something is there unless they need it. In fact, the same thing exists on the project I am currently working on. We have a users table which is checked when they open the db and it populates a hidden form (to make it faster for checks whenever they go to another area).
 
if you use a standard access switchboard you can add extra columns to the switchboard items table to do stuff like this - it doesnt take much playing around with the switchboard manager code

it may be easier to do that than implement full access secrity, which can be a pain at times
 
This caught me at just the right time. One of my projects uses the switchboard and I'm just now splitting the DB and adding security. I'll let you know the steps I go through, unless you get there first.
 
I would add a permissions table, SwitchboardID, User
Join this table to the Switchboard table in the Switchboard code and filter on menu options that way.
 
I worked with this a little on my project last night. There is a column with the form name in the switchboard table. Since I am filtering my security based on form name, I think this'll be a snap. I had already written a VBA function returning a boolean to allow access to forms (in form_load) so I incorporated a call to this function with the form name from the security table, if the action value for the menu item was equal to "3". I haven't tested it yet but it is logically and syntactically correct. I'll keep you updated.
 
Hi All,
As a part of my requirement, i have set of steps to be completed. I am calling one function for one step. What i wanted to do is, i wanted to disable the second button on the switch board unless teh first step is completed sucessfully.
Please can anyone advice me on how can i achieve this.

reagrds,
 
Just re-name the second option on the switchboard to a non-excisting Switchboard menu, that way the option is invisible. Then in your function reset it to the right one enabling the option.
 

Users who are viewing this thread

Back
Top Bottom