Hello
I have a login table and when the person adds there login and password it adds a field to the table. How can i change this so it looks up a field and not makes a new one? the code that i am using is this
If DLookup("[Password]", "tblUsers", _
"[Username]='" & Me![txtUserName] & "'"
= Me![txtPassword] Then
DoCmd.Close
DoCmd.OpenForm "Switchboard"
Else
If MsgBox("The Password that you entered was invalid", vbRetryCancel) = vbRetry Then
DoCmd.OpenForm ("frmLogin"
Else
DoCmd.Quit
End If
End If
End Sub
thanks for the help
IAMUSELESS
I have a login table and when the person adds there login and password it adds a field to the table. How can i change this so it looks up a field and not makes a new one? the code that i am using is this
If DLookup("[Password]", "tblUsers", _
"[Username]='" & Me![txtUserName] & "'"

DoCmd.Close
DoCmd.OpenForm "Switchboard"
Else
If MsgBox("The Password that you entered was invalid", vbRetryCancel) = vbRetry Then
DoCmd.OpenForm ("frmLogin"

Else
DoCmd.Quit
End If
End If
End Sub
thanks for the help
IAMUSELESS