Quote:
Originally Posted by JBurlison
Here is an example of a password change VBA code in my eyes, i have not been doing this long so please correct me if im wrong.
Just my outtake on it as to what i have learned from VBA this past month. this could be wrong tho. like i said i am still new to VBACode:Code: Dim Currentpass As String 'This is the current password Dim Newpass As String 'This is the new password 'At this point you should have 3 text boxes in your form 2 for new passwords (to confirm that they match and 1 to confirm the Old password. For this purpose we will name the text boxes Txt_old, Txt_newone, Txt_newtwo CurrentPass = [Your Current password field here] 'Dlookup if necessary If Currentpass = Txt_old Then Newpass = Txt_newone If Newpass = Txt_newtwo [Your Current password field here] = Newpass Else MsgBox "Your New Passwords Do Not Match" End If Else MsgBox "Current password invalid, Please try again" End If
This will work but you will need to add code to store Newpass in your password table. This will entail opening a recordset and finding the relevant user record and then updating the password field. Finally closing the record.
How Can i do This? can someone post some sample code?
This will work but you will need to add code to store Newpass in your password table. This will entail opening a recordset and finding the relevant user record and then updating the password field. Finally closing the record