0

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
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by bornok15
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.