Can a form have an alias

ryetee

Registered User.
Local time
Today, 13:59
Joined
Jul 30, 2013
Messages
952
I have a system where access can be controlled at form level.

Each form may have an access level as well (from 0-100. Zero is an implied access. ie if there is no access level then it's deemed to be 0. Anyone can access this level).
Basically each user has an access level. If it's zero - he/she can only access those forms that have this level.

All this works and is entirely under the user control. The power user can set the access level of every form and indeed reports as well.

The problem arises when the same form is used for different users.
For example there is 1 form is used to display only the contents of a table. Anyone can do this so access level is zero. The same form is also used by 2 different sets of users. One set can update certain fields and the other group can update the same fields but also other fields as well. Each of these groups should have different access levels but this is not possible as access level is at form level.

I could create 3 forms identical in all but name, but, at the moment, the table(and therefore the form, is quite volatile so I'd need to make amendments to each.

Is it possible to give a form one or more aliases. Access could be given to the alias leaving just one form to be updated.
 
Use the form's open/load event to give access to the controls, (set the controls properties), depending of the user level.
 
I am not aware of aliases but why not read the access levels of the users using the form (for example in the form_load) and then based on this lock some fields?

I am using by the way SQL server as backend now, this makes it more easy to control access to information based on user

Ben
 
Use the form's open/load event to give access to the controls, (set the controls properties), depending of the user level.

I do that already for each form.
So each form takes user access level and checks it with form access level. If the users >= form then he gets access.
Problem is I have effectively 1 form where I need 3 different access levels.
 
..
Problem is I have effectively 1 form where I need 3 different access levels.
What is the problem then, I can't see it, because you can set the controls properties depending of the user level, so some user have access to certain controls other not!
 
I am not aware of aliases but why not read the access levels of the users using the form (for example in the form_load) and then based on this lock some fields?

I am using by the way SQL server as backend now, this makes it more easy to control access to information based on user

Ben

The form in question can be loaded in 3 different ways (a, b and c say).
I can control this and therefore which fields to protect by where it is being called from. What I want to control is which users can access the form in each of the different ways the form is used.

To clarify using another forms, X Y and Z and user1, user2 and user3
USer1 has access level 0, User2 has 10 and User3 55.
The forms also have access levels. Form X is zero Form Y is 11 and Form Z is 54. To access a form you have to have the same personal access level or higher.

User 1 can only access Form X
User 2 can only access Form X as well.
User 3 can access Form Z Y and Z

Now going back to my dilemma.When the form in question is called from form a I want it tohave an access level of zero, if callled from form b and access level of 10 and if called from form c an access level of 56. ie the form can have 3 access levels depending upon where it is called from. As said in the originalpost I can create 3 identical forms and give them the correct access level but it would be more conevnient if I could have 3 alias'seach with its own access level. So if called from form a I load alias a with access level 0 and if called from form b I load alias b with access level of 10 etcetc etc
 
What is the problem then, I can't see it, because you can set the controls properties depending of the user level, so some user have access to certain controls other not!

The problem is access is at form level. The users (or someone with a sufficiently high access level to do it) will have control over this. He will set up each form and give it an access level.

The problem is not setting the controls. The problem is giving/or not giving access to the form when used in a certain mode.
 
have you tried setting permissions to see what the effect would be.
https://technet.microsoft.com/en-us/library/cc961985.aspx

No I don't thinks its applicable here.
I have an existing system that has its own defined access permission throug giving every form and every user and access level.
I have 1 form that 1 need a number of access levels. I can get around this by having 3 identical forms. I'd rather not do this hence the question in the first place.
 
...
Now going back to my dilemma.When the form in question is called from form a I want it tohave an access level of zero, if callled from form b and access level of 10 and if called from form c an access level of 56. ie the form can have 3 access levels depending upon where it is called from. ...
I've tried to make a solution from the above description, maybe you can use it.
First open form "SettingUserLevel" and choose a user.
Then open form "FormA", "FormB" or "FormC" and click the button.
 

Attachments

I've tried to make a solution from the above description, maybe you can use it.
First open form "SettingUserLevel" and choose a user.
Then open form "FormA", "FormB" or "FormC" and click the button.

I had considered this but as the goal of this is to give the (power) user full control over who has access to what it makes it more complicated.

At the moment he has a combo box linked to some SYS table to select the Form (or report) that he wants to give an access level. This then updates a local table with basically formname and access level. The user would have to know which form it was called from. There is a further complication where there is a form that has a number of buttons on. Each button calls the same form but again each needs it's own access level.

That's why I'm asking about an alias as I see this is the only way I can do this without creating multiple forms. Also the alias can be named so as to describe the access which would make it easier for the user to set access levels.
 
Okay I get out here - good luck.
 

Users who are viewing this thread

Back
Top Bottom