koketsomaseko
Registered User.
- Local time
- Today, 05:59
- Joined
- Jun 17, 2014
- Messages
- 11
I have this code to change user password
Private Sub Command3_Click()
If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployee.SetFocus
Exit Sub
End If
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
If Me.txtPassword.Value = DLookup("Password", "Login", "[EmployeeID] = " & Me.cboEmployee.Value) Then
EmployeeID = Me.cboEmployee.Value
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
If IsNull(Me.new_password) Or Me.new_password = "" Then
MsgBox "you must enter the new password.", vbOKOnly, "required data"
Me.new_password.SetFocus
Else
Me.new_password = strEmpPassword
MsgBox ("Your password has been changed.")
End If
But it doesnt change the password please help
Private Sub Command3_Click()
If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployee.SetFocus
Exit Sub
End If
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
If Me.txtPassword.Value = DLookup("Password", "Login", "[EmployeeID] = " & Me.cboEmployee.Value) Then
EmployeeID = Me.cboEmployee.Value
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
If IsNull(Me.new_password) Or Me.new_password = "" Then
MsgBox "you must enter the new password.", vbOKOnly, "required data"
Me.new_password.SetFocus
Else
Me.new_password = strEmpPassword
MsgBox ("Your password has been changed.")
End If
But it doesnt change the password please help