Why is the following code skipping this section...
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No password entered.", vbInformation, "Password Required"
Exit Sub
End If
When I run it if you leave txtPassword blank you receive the "Sorry, you do not have access to the Student Report."
message, which is suppose to be for an incorrect password.
------------------------------------------------------------
Private Sub Command2_Click()
Dim strPasswd
strPasswd = Me.txtPassword
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No password entered.", vbInformation, "Password Required"
Exit Sub
End If
'If correct password is entered open TPA form
'If incorrect password entered give message and exit sub
If strPasswd = "5BrownSt." Then
DoCmd.OpenForm "RunStudentReportForm", acNormal '*Change this line
Else
MsgBox "Sorry, you do not have access to the Student Report.", vbOKOnly, "Restricted Report"
Exit Sub
End If
End Sub
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No password entered.", vbInformation, "Password Required"
Exit Sub
End If
When I run it if you leave txtPassword blank you receive the "Sorry, you do not have access to the Student Report."
message, which is suppose to be for an incorrect password.
------------------------------------------------------------
Private Sub Command2_Click()
Dim strPasswd
strPasswd = Me.txtPassword
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No password entered.", vbInformation, "Password Required"
Exit Sub
End If
'If correct password is entered open TPA form
'If incorrect password entered give message and exit sub
If strPasswd = "5BrownSt." Then
DoCmd.OpenForm "RunStudentReportForm", acNormal '*Change this line
Else
MsgBox "Sorry, you do not have access to the Student Report.", vbOKOnly, "Restricted Report"
Exit Sub
End If
End Sub