I have looked threw several times and cant find it. I am a coder for the united states air force. i feel ashamed that i have to get help but there is a first time for everything right?
help will be much appreciated :)
Private Sub cmdLogin_Click()
On Error GoTo Err_cmdLogin_Click
Dim U As String
Dim P As String
Dim stDocName As String
Dim stLinkCriteria As String
P = txtPassword.Value
U = cboUsername.Value
txtPassword.SetFocus
cboUsername.SetFocus
If U = "Jones" And P = "R2D2" Then
stDocName = "home"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdLogin_Click:
Exit Sub
Err_cmdLogin_Click:
MsgBox Err.Description
Resume Exit_cmdLogin_Click
Else
i = MsgBox("Invalid Username or Password", vbOKOnly, "Invalid Try Agian Please")
End If
If U = "Garcia" And P = "Creator" Then
stDocName = "home"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
i = MsgBox("Invalid Username or Password", vbOKOnly, "Invalid Try Agian Please")
End If
End Sub