G
George
I am trying to add password protection to one form in my
database. What I am trying to do is create a form - have
one text field with the input mask set to Password. When
the password I set = the password entered it opens the
required form. If it doesn't = the password entered it
gives error message "Incorrect Password" I don't know how
to write code - but this is what I am guessing it would
look like.
If [mytextfield] = "mypassword" Then
DoCmd.OpenForm "Name of Form I want to protect"
ElseIf [mytextfield] <> "mypassword" Then
MsgBox ("Incorrect Password")
Cancel = True
End If
database. What I am trying to do is create a form - have
one text field with the input mask set to Password. When
the password I set = the password entered it opens the
required form. If it doesn't = the password entered it
gives error message "Incorrect Password" I don't know how
to write code - but this is what I am guessing it would
look like.
If [mytextfield] = "mypassword" Then
DoCmd.OpenForm "Name of Form I want to protect"
ElseIf [mytextfield] <> "mypassword" Then
MsgBox ("Incorrect Password")
Cancel = True
End If