Password verification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fabiola1
    New Member
    • Oct 2007
    • 5

    Password verification

    I'm using Ms-access 2003.I have a table called users it has two fields called Username and password.I have created a form called security interface.where the user enters the username and password.Can you check the following code.it is not working.I want the code to verify if the entered password and username is correct and open a form or else tell the user to re-enter.

    Dim STDOCNAME As String
    Dim stuser_login As String
    Cmb_User.SetFoc us
    Setrs = Me.RecordsetClo ne = Me![Cmb_User] & "'"
    Me.Bookmark = rs.Bookmark
    Verify = Me.Password
    STDOCNAME = "WELCOME TO CONTRACTS MANEGEMNT SYSTEM"
    DoCmd.OpenForm STDOCNAME, , , stuser_login

    If Fld_PASSWORD = Verify Then
    If Fld_Username = Verify Then

    If UCase(Fld_Usern ame) = "HENDRINA" Then
    If UCase(Fld_PASSW ORD) = "JOD" Then


    Else
    MsgBox "Incorrect password"
    End If
    End If
    End If
    End If
  • jrtox
    New Member
    • Sep 2007
    • 89

    #2
    Originally posted by fabiola1
    I'm using Ms-access 2003.I have a table called users it has two fields called Username and password.I have created a form called security interface.where the user enters the username and password.Can you check the following code.it is not working.I want the code to verify if the entered password and username is correct and open a form or else tell the user to re-enter.

    Dim STDOCNAME As String
    Dim stuser_login As String
    Cmb_User.SetFoc us
    Setrs = Me.RecordsetClo ne = Me![Cmb_User] & "'"
    Me.Bookmark = rs.Bookmark
    Verify = Me.Password
    STDOCNAME = "WELCOME TO CONTRACTS MANEGEMNT SYSTEM"
    DoCmd.OpenForm STDOCNAME, , , stuser_login

    If Fld_PASSWORD = Verify Then
    If Fld_Username = Verify Then

    If UCase(Fld_Usern ame) = "HENDRINA" Then
    If UCase(Fld_PASSW ORD) = "JOD" Then


    Else
    MsgBox "Incorrect password"
    End If
    End If
    End If
    End If

    Hello,
    Try this links, maybe it can gives you an idea



    Regards
    Phils Ervin

    Comment

    Working...