User Levels ?

D

d9pierce

Howdy everyone,

Is there a way to set user levels to buttons or specific forms with in
the same db? Example: lets say I have a form called ProjectDetails and
the Project Manager is authorized in his secrutiy level to add,
edit... all information related to this form and attached forms! Now
the Superintendent which uses the same form has a read only security
level needs to be able to edit certain fields or add certain records
such as edit a contact or add a contact to a subcontractor without
being able to edit or add to a client, mall, or any other forms or
fields. The form in reference is more of a quick reference detailing
information of the Project such as Client, Mall, Estimator, Architect,
Super, Dates and such related to this project allowing the PM to
review projects status quickly in detail. This form has several edit
buttons to change or edit information for each catagory. What I would
really like is to be able to enable buttons to the above settings so
to speak. Not sure if Access or VBA can handle this operation but
would love some suggestions. I could also create the same instance of
a form if there is a way to create some level settings to a form? Any
suggestions would be much apriciated!
Thanks to all,
Dave
 
A

Albert D. Kallal

Is there a way to set user levels to buttons or specific forms with in
the same db?

Keep in mind if your using user level security in ms-access, it only narrows
down to rights for a whole form (and a whole table). So, rights don't extend
down to the field level.

You can however use code to "test" if a menu option or button is legal.

for example, I often disable a menu bar button based on a persons user level
security.

eg:

if IsInGroup(CurrentUser(),"InvoiceDeleteGroup") = true then


CommandBars("myCustomBar").Controls("AdminOptions").Controls("DeleteInvoice"
).Visible = True

end if

So, in the above, if the user is a member of the security group called
DeleteInvoice, then I enable the menu bar option that allows that feature.
You can do the same with a button on a form also.

eg:
me.MyButtionName.enabled = true


As mentioned you would replace the security group "DeleteInvoice" with the
name of the security group you created that users are to be a member of.


I should probably point out that user level security been discontinued for
access 2007 (it still works if you use the mdb format, but not for accDB
format. And, it not 100% clear in your last 3 posts if you are in fact using
ULS, or simply rolling your own security system.
 
D

d9pierce

Keep in mind if your using user level security in ms-access, it only narrows
down to rights for a whole form (and a whole table). So, rights don't extend
down to the field level.

You can however use code to "test" if a menu option or button is legal.

for example, I often disable a menu bar button based on a persons user level
security.

eg:

if IsInGroup(CurrentUser(),"InvoiceDeleteGroup") = true then

CommandBars("myCustomBar").Controls("AdminOptions").Controls("DeleteInvoice­"
).Visible = True

end if

So, in the above, if the user is a member of the security group called
DeleteInvoice, then I enable the menu bar option that allows that feature..
You can do the same with a button on a form also.

eg:
me.MyButtionName.enabled = true

As mentioned you would replace the security group "DeleteInvoice" with the
name of the security group you created that users are to be a member of.

I should probably point out that user level security been discontinued for
access 2007 (it still works if you use the mdb format, but not for accDB
format. And, it not 100% clear in your last 3 posts if you are in fact using
ULS, or simply rolling your own security system.

Thank you, I beleive that will help out a lot. I am using ULS
currently but may change to something different as I upgrade from 2003
to 07 and begin making adp's instead of mdb/mde!
Thanks so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top