Question for the masses,
I have a cmd buton that runs a delete current record operation. I have the code set up so that when pressed, an input box tells the user that the supervisor must enter his/her password to complete the function. The code is listed as follows:
Private Sub Command55_Click()
On Error GoTo Err_Command55_Click
Dim strpasswd
strpasswd = InputBox("NEED SUPERVISOR PERMISSION
lease enter password to continue void transaction function", "Restricted Function")
If strpasswd = "supervisorpassword" Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
Exit_Command55_Click:
Exit Sub
Err_Command55_Click:
MsgBox Err.Description
Resume Exit_Command55_Click
End If
End Sub
The problem that I'm having is that at any point in the day there will be 3 - 5 supervisors on duty. I have only been successful in setting up the code to run on one predetermined supervisor password. What I would like to do is set the strpasswd to equal the supervisor group built in user-level security but I'm not sure how this is done.
This way the code will recognize the passwords of any of the supervisors around at that time and will be able to complete the delete record function. If someone knows how to set this up please let me know...
Thanks in advance,
Kevin
[This message has been edited by MSUKevin (edited 07-31-2001).]
I have a cmd buton that runs a delete current record operation. I have the code set up so that when pressed, an input box tells the user that the supervisor must enter his/her password to complete the function. The code is listed as follows:
Private Sub Command55_Click()
On Error GoTo Err_Command55_Click
Dim strpasswd
strpasswd = InputBox("NEED SUPERVISOR PERMISSION
If strpasswd = "supervisorpassword" Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
Exit_Command55_Click:
Exit Sub
Err_Command55_Click:
MsgBox Err.Description
Resume Exit_Command55_Click
End If
End Sub
The problem that I'm having is that at any point in the day there will be 3 - 5 supervisors on duty. I have only been successful in setting up the code to run on one predetermined supervisor password. What I would like to do is set the strpasswd to equal the supervisor group built in user-level security but I'm not sure how this is done.
This way the code will recognize the passwords of any of the supervisors around at that time and will be able to complete the delete record function. If someone knows how to set this up please let me know...
Thanks in advance,
Kevin
[This message has been edited by MSUKevin (edited 07-31-2001).]