Password Change Help (1 Viewer)

Fogfive

New member
Local time
Today, 07:07
Joined
Nov 23, 2017
Messages
1
Hello, I am new to this group.

I am having a real issue with creating this Password Change function.
I have a table called "tblUser" which contains 5 columns. "UserID", "UserName", "Password", "UserAccess", and "UserEmail".

The Form "LOGIN_FORM", has 4 fields. "cboUser", "txtConfirmPassword", "pwFirst", and "pwSecond"

Below is the code I have so far. but, whenever I execute this, I get error message: "Run-Time-Error '3061' Too few parameters. Expected 1."

Private Sub Update_Click()
Dim s As String
If Me.txtConfirmPassword <> Me.cboUser.Column(2) Then
MsgBox "Password entered does not match old password"
Exit Sub
End If
If Me.pwFirst = Me.pwSecond And Len(Me.pwFirst) & "" > 0 Then
s = "UPDATE tblUser SET Password = '" & Me.pwSecond & "' WHERE UserID = " & Me.cboUser
CurrentDb.Execute s, dbFailOnError
MsgBox "Password Changed!"
'DoCmd.OpenForm "Home"
'DoCmd.Close acForm, Me.Name

Else
MsgBox "New Password entries do not match. Re-enter ." _
& vbCrLf & "and please try again.", vbCritical, _
"Re-enter both Passwords."
End If
End Sub

I have to have this functional on Monday Morning, so if anyone can help, I would be greatly appreciative!!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:07
Joined
May 7, 2009
Messages
19,247
what are the columns of your combo.
combo columns are zero base, meaning .column(0) is actually column 1.
 

Users who are viewing this thread

Top Bottom