Hi I am still quite new to this. Looking for some help with a DLookup.
I am trying to build a password reset to my login screen as i am tired of changing passwords.
I am currently stuck on how to have a dlookup that checks a pin (me.EnterPin) against what pin is stored in table "Users" as well as making sure that the username (me.EnterExistingUsername) matches that records username.
For now i am just using 2 x MsgBox (Win/Fail) just to make sure it works.
What i have created below only returns fail. Please can someone help?
Am i doing this all wrong?
Please help.
I am trying to build a password reset to my login screen as i am tired of changing passwords.
I am currently stuck on how to have a dlookup that checks a pin (me.EnterPin) against what pin is stored in table "Users" as well as making sure that the username (me.EnterExistingUsername) matches that records username.
For now i am just using 2 x MsgBox (Win/Fail) just to make sure it works.
What i have created below only returns fail. Please can someone help?
Code:
If (IsNull(DLookup("[Username]", "Users", "[EnterExistingUsername] ='" & Me.EnterExistingUsername.Value & "' And PIN = '" & Me.EnterPin.Value & "'"))) Then
MsgBox "Win"
Else
MsgBox "Fail"
Am i doing this all wrong?
Please help.