Password Reset Form Doesn't Work in Runtime Access 2010

DeanFran

Registered User.
Local time
Today, 11:59
Joined
Jan 10, 2014
Messages
111
I created a small database with a user login form, along with a password reset form. Running it in my sandbox as an accdr file, the password value resets just fine, but on my test machine with the Access 2010 runtime installed, the password reset form doesn't reset the password. I will try to describe the state of things as of this point.

1. The LoginF presents with a combo box for the user to choose their name, and a text box to enter their password. The code below is on the After Update of the password text box.
Code:
Private Sub txtPassword_AfterUpdate()
'Check if user has been chosen
If IsNull(Me.cboUser) Then
MsgBox "Please Select User Initials", vbInformation, "Warning"
Me.cboUser.SetFocus
End If
'compare cboUser column 2 to entry in txtPassword
If Me.txtPassword = Me.cboUser.Column(2) Then
Me.Visible = False
varCorrectPassword = True
Else
MsgBox "Password Incorrect", vbInformation, "Warning"
Me.txtPassword = Null
Me.txtPassword.SetFocus
End If
'Check Access Level and open  navigation form
If varCorrectPassword = True Then
    'Admin Form
        DoCmd.OpenForm "MainNav"
End Sub
2. The password reset form has two text boxes for the new password and to re-enter the same, as well as a command button with this code.

Code:
Private Sub cmdResetPassword_Click()
If Me.Password = Me.PasswordTest And Len(Me.Password) & "" > 0 Then
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
DoCmd.OpenForm "LoginF"
Else
MsgBox "Passwords do not match"
Me.Password = Null
Me.PasswordTest = Null
Me.Password.SetFocus
End If
End Sub

As I say, this works as an accdr file, but not in the actual runtime environment. Any assistance is appreciated.
 
Additional info, the textbox named "Password" is bound to the User table "UserT", Password field (a text field with a password input mask). Further research reveals that the Password field is not getting updated. What am I missing?

Further info: After adding a UserID (PK) textbox to my login form to watch what happens, the form defaults to the first user I added, "myself", no matter which user I select in the combo box. Then I added a UserID text box to the password reset form, and it defaults to that user as well. So what I am doing is changing the password for that user no matter which user is logged on.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom