Private Sub Command369_Click()
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Please Enter the password to allow access."
strInput = InputBox(Prompt:=strMsg, Title:="Sales Password")
If strInput = "Steve5" Then
MsgBox "Password accepted! Welcome! " & "Stephen Rouse"
DoCmd.OpenForm "sales orders"
DoCmd.Close acForm, Me.Name
ElseIf strInput = "Mandy9" Then
MsgBox "Password accepted! Welcome! " & "Mandy Wells"
DoCmd.OpenForm "sales orders"
DoCmd.Close acForm, Me.Name
Else 'password is incorrect
MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the ''sales form''.", vbCritical, "Invalid Password"
Exit Sub
End If
End Sub
[CODE]Private Sub Command369_Click()
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Please Enter the password to allow access."
strInput = InputBox(Prompt:=strMsg, Title:="Sales Password")
If strInput = "Steve5" Then
MsgBox "Password accepted! Welcome! " & "Stephen Rouse"
DoCmd.OpenForm "sales orders"
DoCmd.Close acForm, Me.Name
ElseIf strInput = "Mandy9" Then
MsgBox "Password accepted! Welcome! " & "Mandy Wells"
DoCmd.OpenForm "sales orders"
DoCmd.Close acForm, Me.Name
Else 'password is incorrect
MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the ''sales form''.", vbCritical, "Invalid Password"
Exit Sub
End If
End Sub