So I've figured out how to do this with the following code:
Private Sub Form_Open(Cancel As Integer)
Dim pwd As String
pwd = InputBox("Authorized Users Only. Please enter password.")
If pwd = "Password" Then
MsgBox "Access granted."
Else
MsgBox "Incorrect password entered. Check that you are authorized to access this area."
DoCmd.Close
End If
End Sub
The trouble is, the code pops up as soon as the databse is opened, rather than only when someone tries to access the protected form. Any suggestions?
Thanks!