By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,221 Members | 1,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,221 IT Pros & Developers. It's quick & easy.

VBA code for forgotten password in ms access07

P: 39
I have created login form for my database and I want to add button forgot password to reset password. I already create register form to add user with two security questions with answers and is saved in trousers. On click of forgot password button opens form having txtbox for user name and submit button. In which after entering exiting user name and click button want to show subform with security questions for current user and after giving correct answer want to show another subform for change password having new password and confirm password fields with OK button. So I want to write code for that ,please help and suggest any code for that .Thanks in advanced.
Jun 4 '17 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,397
sachuchem22
- You have the first step in this process - stating the goal.

+ What I would do from here is flow chart this process, yes, I know, it's old school; however, what you want to do has several steps and these need to be in logical order. I prefer N-S type charts:
Wiki: Nassi-Shneiderman

Here's a PDF with a bit of a tutorial on N-S diagrams
UMD.EDU: NASSI-SHNEIDERMAN CHARTS AN ALTERNATIVE TO FLOWCHARTS FOR DESIGN

Hopefully once you have your logic charted out you can then start the process of writing code.

Once you have your basic code created, post it back here and we'll be glad to help.

My initial thought here would be to use the same concept as one uses for cascading form filtering:
home > topics > microsoft access / vba > insights > cascaded form filtering
Such that your user clicks on the recovery button the recovery form opens
TextBox 1: User Id Entry
TextBox 2:
Enabled = false
Control source updates after the user id control updates to show your first recovery question
TextBox 3: User data entry
TextBox 4:
Enabled = false
Control source updates after the user id control updates to show your second recovery question
TextBox 5: User data entry
Command button: Use this to submit the answers for comparison. Simple recordset search or even just the DLOOKUP() against the records containing your user's recovery information.

>> MY CAUTION HERE <<
1) Access is NOT secure. HARD-STOP - any sensitive information needs to be encrypted.

2) You should consider using something like one of the following concepts to store ALL of the user id's, user passwords, and user responses to the security questions
+ home > topics > microsoft access / vba > insights > generate secure user passwords using the md5 hash class module (MD5 isn't considered the best hash now; however, IMHO, for simple validations of non-sensitive information it is still reasonable
+ home > topics > microsoft access / vba > insights > sha2 cryptographic hash algorithm for vba and vbscript
This is the hash I use for my database user names and passwords along with what is known as a salt value.
+ home > topics > microsoft access / vba > insights > aes encryption algorithm for vba and vbscript

+ home > topics > microsoft access / vba > insights > rc4 encryption algorithm for vba and vbscript

> I work in a secured environment so my recovery method is to create a record in at table that is used to record the user ID and the primary key is set to datatype(autonumber(Replication ID)
All of my users have secured internal email so I generate an email with the new primary key, send it to them. Once they enter the sent value I look it up in the table, record the date and time, and then allow a reset of the password.
There is also an email sent to myself and a supervisor behind the scenes so one of us follows up with that user to verify the password reset.
Jun 17 '17 #2

Post your reply

Sign in to post your reply or Sign up for a free account.