Precursor: "I have searched for several hours and tried a lot of different methods so I apologize if this has been answered"
I have a Log-in required database that I am adding a change password form to. The form works with an exception of one error; I cannot close the form after changing the password. I receive the error: This action can't be carried out while processing a form or report event. (2585)
Table tbl_Users
Form frm_ChangePass Values
Form frm_ChangePass VBA
I'll leave out the If/Else shell unless you want to see it.
**strUser is a global string set on log-in.
I have a Log-in required database that I am adding a change password form to. The form works with an exception of one error; I cannot close the form after changing the password. I receive the error: This action can't be carried out while processing a form or report event. (2585)
Table tbl_Users
Code:
ID AutoNumber UserName Short Text Password Short Text Role Short text
Code:
oldpass (unbound textbox refers to password in field) newpass (unbound textbox refers to new pass) confirmpass (unbound textbox used to validate new pass)
Form frm_ChangePass VBA
Code:
Dim strUpdateSQL As String Dim strCUser As String strCUser = strUser newpass.SetFocus DoCmd.SetWarnings False strUpdateSQL = "UPDATE tbl_Users SET Password ='" & Me.newpass.Value & "' WHERE UserName ='" & strCUser & "'" DoCmd.RunSQL strUpdateSQL DoCmd.SetWarnings True DoCmd.Close acForm, "frm_ChangePass", acSaveNo DoCmd.OpenForm "frm_Menu", acNormal, "", "", , acNormal
**strUser is a global string set on log-in.
Comment