Password Problem

razor23

New member
Local time
Today, 14:20
Joined
Aug 4, 2007
Messages
3
Hello,

I made a password form and im trying to connect the user name and password text boxes to the contents of a password table. how can i connect it so when i click on the enter button, the program checks the table if the user name or password exists in the table and if it matches.

Code:
    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim strUserName As String
    Dim strPassword As String
            
    If UserID.Text = "" Then 'its blank because i dont know how to link it to table yet
        If UserPassword.Text = "" Then 'its blank because i dont know how to link it to table yet
        stDocName = "Main"
        stDocName1 = "Password"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
        DoCmd.Close acForm, stDocName1
        Else
        MsgBox "USER ID AND PASSWORD DOES NOT MATCH!", vbOKOnly, "INVALID PASSWORD"
    End If
    End If

btw when i click on the enter button, a dialog box appears saying "You cant reference a property or method for a control unless the control has the focus"...what does that mean?
 

Users who are viewing this thread

Back
Top Bottom