Something along the lines of
Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"
If InputBox("Please Enter Password") <> strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If
End Sub
You had best read up on Access security as, unless you take
measures to protect the form and its code, it would not
take too much effort for anybody to see what the password was.
Hope This Helps
Gerald Stanley MCSD