hi there! i needed this urgently...i've already posted a topic entitled time monitoring system.i've seen that there are already some who viewed my topic yet i still haven't received any replies. i guess is should break down my topic little by little for I know I can't get results that fast.
My time monitoring system includes a user login form where the employees will need to enter their Employee ID and password. As you can see this time monitoring system includes multiple users, having different passwords. I am using MSAccess.
Here is my code for my user log in
CODE
Private Sub cmdOK_Click()
With myRS
If txtEmpID = .Fields(0) And txtPassword = .Fields(1) Then
Form2.Show
ElseIf txtEmpID <> .Fields(0) And txtPassword <> .Fields(1) Then
MsgBox ("invalid user")
End If
End If
End With
End Sub
Is my code right?
I have only two records in my database:
EMPID PASSWORD
AD001 maintenance
DE004 employee
When I enter AD001 w/ the "maintenance" password, Form2 shows. But when I enter the second user DE004 w/ the "employee" password, "Invalid user" appears.
I was just wondering why is this happening. Why would employee DE004 became invalid if it was one of the records in my database?
I've tried adding a new record AA001 w/ the "administrator" password. When I once again entered employee AD001, this time Form2 was not shown,instead "Invalid user" appears. When I entered employee AA001(my new added record), Form2 shows.
What I see here is, only the record in the first row of my table works...
Please help...
Thanks