Have an Access front end Login Form which includes an option for the user to change password. In frm_Login Sub I'm attempting to use the following to pass the entered username "Me.txtUserName" to frm_PassChange:
If Me.changepass = "Yes" Then
DoCmd.OpenForm "frm_PassChange", , , , , Me.txtUserName
End If
In frm_PassChange Sub I want the user to enter a new password "Me.txtNewPass" which I will then store in a usertable X_tblUsers:
CurrentDb.Execute "UPDATE X_tblUsers SET X_tblUsers.Password = '" & Replace(Me.txtNewPass.Value, "'", "''") & "' " & _
"WHERE X_tblUsers.Username = '" & Me.OpenArgs & "'"
I'm getting a type mismatch error on the DoCmd.OpenForm call. Can anyone help?