Hi Everyone
I have a database that has a main form (frmMaster) on this form is a range of buttons (btn1, btn2 etc)
I also have two (2) tables (tblUser) and (tblControls) related on a one to one relationship. The tblUser contains a department field and a password field and tblControl has the buttons from frmMaster as yes/no
I have created a second form that contains the fields from each of the above tables allowing a user to choose a department and tick which buttons will be active for that department.
I have also created an initial login form that allows a user to choose his/her department and enter the assigned password.
Finally, now my problem (if you have already picked up on it) how do I or what would be the correct code structure to get form frmMaster to open enabling those buttons as stipulated in the control table.
Scenerio Example:
Manager logs on goes to main form choose security subform and then chooses department sales, then checks the controls he/she wants the sales department to have access to. Then a user from sales logs on with his/her credentials and opens the main form and when he/she clicks on a button deemed inactive by the manager will recieve a msgbox 'Access Denied'.
I sincerely appreciate your feedback and I appologise for any headaches caused. Nothing like a challenge, hey?
I have a database that has a main form (frmMaster) on this form is a range of buttons (btn1, btn2 etc)
I also have two (2) tables (tblUser) and (tblControls) related on a one to one relationship. The tblUser contains a department field and a password field and tblControl has the buttons from frmMaster as yes/no
I have created a second form that contains the fields from each of the above tables allowing a user to choose a department and tick which buttons will be active for that department.
I have also created an initial login form that allows a user to choose his/her department and enter the assigned password.
Finally, now my problem (if you have already picked up on it) how do I or what would be the correct code structure to get form frmMaster to open enabling those buttons as stipulated in the control table.
Scenerio Example:
Manager logs on goes to main form choose security subform and then chooses department sales, then checks the controls he/she wants the sales department to have access to. Then a user from sales logs on with his/her credentials and opens the main form and when he/she clicks on a button deemed inactive by the manager will recieve a msgbox 'Access Denied'.
I sincerely appreciate your feedback and I appologise for any headaches caused. Nothing like a challenge, hey?