D
Dan @BCBS
My change password code is not working.
When Submit (command button) is clicked it tells me the moduel to update the
password is not working..
This is the code on the form to update the password- the error is at The
error is at
UpdatePW.NewPW cboUser, txtPassword.. (the module code is after submit
command code)
Private Sub cmdSubmit_Click()
Dim UpdatePW As New ChangePADPW
If Me.filledCheck = False Then
MsgBox "Please complete all entries before " & _
"submitting your new password.", vbInformation, _
"Provider Appeals Database (PAD)"
ElseIf txtPassword <> txtConfirm Then
MsgBox "Password and Confirm Password do not " & _
"match. Re-enter one or both.", vbInformation, _
"Provider Appeals Database (PAD)"
Else
UpdatePW.NewPW cboUser, txtPassword
End If
End Sub
//////////////////////////
Here is the Moduel to update the password:
Sub NewPW(eid As Long, NuPassword As String)
Dim cmd1 As Command
Dim strSQL As String
'Assign the command reference and connection.
Set cmd1 = New ADODB.Command
cmd1.ActiveConnection = CurrentProject.Connection
'Define the SQL string; notice
'the insertion of passed arguments.
strSQL = "UPDATE t_Users " & _
"SET t_Users.Password = """ & NuPassword & """ " & _
"WHERE RACFID=" & eid & ";"
Debug.Print strSQL
'Assign the SQL string to the command and run it.
cmd1.CommandText = strSQL
cmd1.CommandType = adCmdText
cmd1.Execute
'Confirmation message
MsgBox "Your new password is accepted. or " & _
"Exit this form.", vbInformation, _
"Provider Appeals Database (PAD)"
End Sub
When Submit (command button) is clicked it tells me the moduel to update the
password is not working..
This is the code on the form to update the password- the error is at The
error is at
UpdatePW.NewPW cboUser, txtPassword.. (the module code is after submit
command code)
Private Sub cmdSubmit_Click()
Dim UpdatePW As New ChangePADPW
If Me.filledCheck = False Then
MsgBox "Please complete all entries before " & _
"submitting your new password.", vbInformation, _
"Provider Appeals Database (PAD)"
ElseIf txtPassword <> txtConfirm Then
MsgBox "Password and Confirm Password do not " & _
"match. Re-enter one or both.", vbInformation, _
"Provider Appeals Database (PAD)"
Else
UpdatePW.NewPW cboUser, txtPassword
End If
End Sub
//////////////////////////
Here is the Moduel to update the password:
Sub NewPW(eid As Long, NuPassword As String)
Dim cmd1 As Command
Dim strSQL As String
'Assign the command reference and connection.
Set cmd1 = New ADODB.Command
cmd1.ActiveConnection = CurrentProject.Connection
'Define the SQL string; notice
'the insertion of passed arguments.
strSQL = "UPDATE t_Users " & _
"SET t_Users.Password = """ & NuPassword & """ " & _
"WHERE RACFID=" & eid & ";"
Debug.Print strSQL
'Assign the SQL string to the command and run it.
cmd1.CommandText = strSQL
cmd1.CommandType = adCmdText
cmd1.Execute
'Confirmation message
MsgBox "Your new password is accepted. or " & _
"Exit this form.", vbInformation, _
"Provider Appeals Database (PAD)"
End Sub