Passwords

TheSafetyGuy86

Registered User.
Local time
Today, 19:03
Joined
Jun 18, 2013
Messages
31
Password Help

Good day,
I have a table that contains user names and passwords (yes, I know that I should hash them, but that kind of code and it's processes are beyond my current understanding) and I have a form that allows the users to select their username and then enter their password. When they click a button, it compares the password stored in the table to the password entered and then opens the main form. The problem I have is that the code doesn't recognize capital letters. I can simply place the password in there with any form of lettering and it will read. I want it to read the password exactly as it is placed on their initial setup.

If EPassword = SPassword Then
DoCmd.OpenForm "Selector", acNormal, "", "", acFormAdd, acWindowNormal, ""
Else
MsgBox "The password entered is incorrect. Try Again.", vbExclamation, "Wrong Password!"
Me.EPassword = ""

:banghead:

of all things, this is probably one of the simplest things to do, but I have to admit that I don't understand completely the VBA codes enough to complete this on my own. Does anyone know what I need to do to fix this and would you please give me the run down. On the same note, if anyone knows the process for using a one way hash and can explain it by steps, that would be awesome too. Trust me, I am a very fast learner and can work things out on my own, but it has been complicated to learn everything involved so far. Thank you and have a good day.

Lee
 
Last edited:
Lee, Welcome to AWF.. :)

On the very top of the Module, do you have the following statements?
Code:
Option Compare Database
Option Explicit
If yes, You can remove Option Compare Database that will make sure that the Capitals are recognized.. In other words lets the default Binary Comparison.. Or you can use the StrComp with the vbBinaryCompare option..
 
I did have the Option Compare Database in there. Upon taking it out it worked the way I wanted it to. Thank you very much for your help! I will probably post more stuff as I learn more about this kind of work. And thanks for the warm welcome :D.
 
Glad to help, and we would try our best to help out again :)
 

Users who are viewing this thread

Back
Top Bottom