Hmm, I probably need to provide more information.
I have an 'employee wages' section that should only be changed by those with administrative control, essentially there are a set of forms that can be opened by accessing my 'admin' form though a password, I want to be able to protect the tables/forms behind this form from manual access, I would also like to be able to avoid asking for a password for every item opened after the main password is used.
Is this possible?
Here is the code I have used:
Private Sub cmdAdmin_Click()
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "This form is used only by those with administrative permission." & vbCrLf & vbLf & "Please key the Administrative password to allow access."
strInput = InputBox(Prompt:=strMsg, title:="Admin. Access")
If strInput = "Admin" Then 'password is correct
DoCmd.OpenForm "frmAdmin-Info"
DoCmd.Close acForm, Me.Name
Else 'password is incorrect
MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access.", vbCritical, "Invalid Password"
Exit Sub
End If
End Sub