C
Chad
Hello, I have this code behind a button and wanted to ask why it dont work?
Private Sub cmdLogin_Click()
Dim stDocName As String
Dim stLinkCriteria As String
If Me.txtPassword = "soggycashew" Then
stDocName = "frmUpdateEmployees"
DoCmd.OpenForm stDocName, , , stLinkCriteria
'Form!frmSwitchboard.Visible = False 'Hides the switchboard
Else
Me.cmdHiddenButton.SetFocus
Me.cmdLogin.Visible = False
Me.txtPassword.Visible = False
Me.imgPassword.Visible = False
Me.cmdCancel.Visible = False
Me.imgIncorrectPassword.Visible = True
Me.TimerInterval = 4000
End If
End Sub
Private Sub cmdLogin_Click()
Dim stDocName As String
Dim stLinkCriteria As String
If Me.txtPassword = "soggycashew" Then
stDocName = "frmUpdateEmployees"
DoCmd.OpenForm stDocName, , , stLinkCriteria
'Form!frmSwitchboard.Visible = False 'Hides the switchboard
Else
Me.cmdHiddenButton.SetFocus
Me.cmdLogin.Visible = False
Me.txtPassword.Visible = False
Me.imgPassword.Visible = False
Me.cmdCancel.Visible = False
Me.imgIncorrectPassword.Visible = True
Me.TimerInterval = 4000
End If
End Sub