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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.