Encrypting password field in a table

Hello Experts,

I've created a login form which stores the login information in a table. I would like to encrypt the passwords. I'm very confused, after doing some web research, it seems like everybody has a different idea, but I coudn't find any complete solution which I could follow.

Any help will be appreciated very much.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Boyd (HiTechCoach) Trimmell, Microsoft Access MVPConnect With a Mentor Commented:
If you would like to see a working Access example, here is what I use to encrypt passwords : Encryption:

Rey Obrero (Capricorn1)Connect With a Mentor Commented:
see this link,

it has a function "Function KeyCode" that encrypts/decrypts a password
hello_everybodyAuthor Commented:
Thanks for the quick response. The article you've pointed me to deals with password protecting a form or report. How would I implement that in a password field in a table?
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Rey Obrero (Capricorn1)Commented:
didn't you read the part

"it has a function "Function KeyCode" that encrypts/decrypts a password"
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
To provide a little more detail:

Access cannot do this natively, so you must take measures similar to the link capricorn posted to do this. You'll have to do this manually - that is, you'll have to work with an unbound Textbox for the Password control, and then Encrypt/Decrypt the password value via code. You can have a bound, hidden field on the form that is used to store and retrieve the password, of course, and that's probably the best way to manage this.

You'd then use the AfterUpdate event of your password Textbox to move data in and out of that field, calling the Encrypt/Decrypt functions as needed. Basically, in the AFterUpdate event of your control, you'd first validate the Password (i.e. you'd "decrypt" the stored value, and compare it to what the user typed in), and then take action as needed (i.e. let the user continue, or alert them that something is wrong with the entered password).
Gustav BrockConnect With a Mentor CIOCommented:
What you should do is to create a MD5 hash of the password and store that.
By doing so, you don't even store the password and there is no way to retrieve it, only reset it.

To check a password, create the MD5 hash of and compare with the stored hash; if match, the password is correct.

Proceed with code here:

Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:

I was recently told that in a EE newsletter it stated that we are not supposed to provide external links except to MSDN articles.  Have you heard this?  
Gustav BrockCIOCommented:
> Have you heard this?  

No. Can't be true. This is not a sandbox, there is a world out there.

Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:

Thank you for the information . Great advice.  I will gladly  follow it.

I want to be sure that I am following the rules while  doing my best to answer  questions.with the best advice I know.

I had another expert get upset with me for posting an external link.  I was baffled by the response.

Thank you for clearing this up.
hello_everybodyAuthor Commented:
Thank you all for your input.
I have an urgent project that came up so this is on hold for the time being, hopefully I'll get back to it sometime this week.
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Thanks for the update.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.