More than one person needs access to (personnel) form to update personnel records. Is there an easy why to change my code to accomplish this. I'm using Access 97 security I.E. and logging in as chubby. On the open event of my form (in Visual Basic), I did placed the following code and it works fine, but only for one person, all other users are denied access.
Private Sub Form_Open(Cancel As Integer)
On Error GoTo ErrFO
If CurrentUser()<> "chubby" Then
MsgBox "Permission denied.", vbCritical, "Security Check."
Cancel = True
End If
ExitFO:
Exit Sub
ErrFO:
MsgBox Err.Description, vbInformation, "Form Open Error."
Resume ExitFO
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo ErrFO
If CurrentUser()<> "chubby" Then
MsgBox "Permission denied.", vbCritical, "Security Check."
Cancel = True
End If
ExitFO:
Exit Sub
ErrFO:
MsgBox Err.Description, vbInformation, "Form Open Error."
Resume ExitFO
End Sub