0

I am looking for a way to give each user in my VB program privileges. So for example admin would be
able to add and edit staff records while a normal user could not. this would all be based on a login
for each user (and yes its a database project). I think you may have to use some disable botton feature but i dont know how to do it.
im a noob so please could someone please help me out and explain the solution in a way i could
understand thanks.

3
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by JGorard159
0

There are basically two approaches and it is a matter of taste which you prefer.

For functions that the user does not have priveleges for you can choose to make the command buttons, text fields etc either

disabled - in which case they will still appear but greyed out
not visible - in which case they will not appear on the form

enabled and visible are both properties of each control that you can set.

0

Just have a column in your database table called "permissions", and for each user give a value of either "admin" or "user". Then just run a query to see which permission is set for the user using the service, and set the "enabled" property of the admin-only options to false whenever a non-admin is using the system.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.