var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Form Security Question
I have an Access Form, that has two fields:
That seems to work ok.
Now after the user enters the correct username and password, the form closes an opens another form, and it΄s in this new form i wish to set different type of users.
Now my big question is, how can i set user access levels to the different users, so that one type of users have free access to all fields and other users just have read only.
In my personnal table i have a field named "Level" that is used to define the user access level - like this:
- 1 (Administrator)
- 2 (Read Only)
Can this be done?
Not sure if this is the best way, but global variables might be one way to go. Pick up the security level on the first form, then assign a value to the global variable, e.g. gDataEdit. Then on the load event of each form something on the lines of :
If gDataEdit = false then me.allowEdits=false
That's a bit of a simplification, but it covers the general idea. There may be much better ways of doing it though.
I would stick with the already created .mdw system. I have a previous thread that I will see if I can dig up that will go step by step on how to setup users and access security.
I agree with the global variable. make it a boolean set from the login/password form. Then on each additional form use something like.
if not authorized then
You can put all kinds of restrictive codes there
how can i do that?
Need help with the code!
David I think I've replied to your other thread already...
see if that helps or else inform and we'll try to further help you out. It is not a big problem...