Guest_imported
New member
- Jan 1, 1970
- 0
I have an existing DB that you need a password and an ID to open up. This stores attendace information for several hundred associates. I need to know if and how to add 22 ID's as a read only, where they can view but not edit any records. Can this be done? I'm on a NT network and can not alter Access permissions over the network. I also did not create this DB.
This is the VB for the password and ID:
Private Sub PASSWORD_AfterUpdate()
On Error GoTo err_PASSWORD_AfterUpdate
If Me![PASSWORD] = "xxxx" Or Me![PASSWORD] = "yyyy" Or Me![PASSWORD] = "zzzz" Or Me![PASSWORD] = "aaaa" Or Me![PASSWORD] = "bbbb" Then
gOkToclose = True
Forms!frmForm1!Command7.Enabled = True
Forms!frmForm1!Command7.SetFocus
DoCmd.close A_FORM, "frmPassword1"
Else
' give them three shots at getting it right
Select Case gintpasswordflag
Case 1 To 2
DoCmd.Beep
MsgBox "Incorrect password", 16, "Password"
gintpasswordflag = gintpasswordflag + 1
Case Else
DoCmd.Beep
DoCmd.OpenForm "frmPasswordFail1"
End Select
End If
exit_PASSWORD_AfterUpdate:
Exit Sub
err_PASSWORD_AfterUpdate:
MsgBox "Error " & err & ": " & Error$, 0, "Password"
Resume exit_PASSWORD_AfterUpdate
End Sub
This is the VB for the password and ID:
Private Sub PASSWORD_AfterUpdate()
On Error GoTo err_PASSWORD_AfterUpdate
If Me![PASSWORD] = "xxxx" Or Me![PASSWORD] = "yyyy" Or Me![PASSWORD] = "zzzz" Or Me![PASSWORD] = "aaaa" Or Me![PASSWORD] = "bbbb" Then
gOkToclose = True
Forms!frmForm1!Command7.Enabled = True
Forms!frmForm1!Command7.SetFocus
DoCmd.close A_FORM, "frmPassword1"
Else
' give them three shots at getting it right
Select Case gintpasswordflag
Case 1 To 2
DoCmd.Beep
MsgBox "Incorrect password", 16, "Password"
gintpasswordflag = gintpasswordflag + 1
Case Else
DoCmd.Beep
DoCmd.OpenForm "frmPasswordFail1"
End Select
End If
exit_PASSWORD_AfterUpdate:
Exit Sub
err_PASSWORD_AfterUpdate:
MsgBox "Error " & err & ": " & Error$, 0, "Password"
Resume exit_PASSWORD_AfterUpdate
End Sub