saadtanvir93
New member
- Local time
- Today, 18:14
- Joined
- Sep 27, 2018
- Messages
- 5
please help
Private Sub Command7_Click()
If IsNull(Me.Text0) Then
MsgBox "please enter oldpassword", vbininformation, "warning"
Me.Text0.SetFocus
ElseIf IsNull(Me.Text2) Then
MsgBox "please enter Password", vbininformation, "warning"
Me.Text2.SetFocus
Else
'process the job
If (IsNull(DLookup("password", "tbluser", "password='" & Me.Text0.Value & "'"))) Then
MsgBox "incorrect password", vbininformation, "warning"
Else
If (Me.Text2 = Me.Text4) Then
CurrentDb.Execute "UPDATE tbluser " _
& "Set Password = 'Me.text2'" _
& "Where Userid = 'Me.text8';"
MsgBox ("Your password has now been updated")
End If
End If
End If
End Sub
in this code text0 is previous password
text2 in the new password and
text8 is the username
the code runs fine but does not update the value in the table
Private Sub Command7_Click()
If IsNull(Me.Text0) Then
MsgBox "please enter oldpassword", vbininformation, "warning"
Me.Text0.SetFocus
ElseIf IsNull(Me.Text2) Then
MsgBox "please enter Password", vbininformation, "warning"
Me.Text2.SetFocus
Else
'process the job
If (IsNull(DLookup("password", "tbluser", "password='" & Me.Text0.Value & "'"))) Then
MsgBox "incorrect password", vbininformation, "warning"
Else
If (Me.Text2 = Me.Text4) Then
CurrentDb.Execute "UPDATE tbluser " _
& "Set Password = 'Me.text2'" _
& "Where Userid = 'Me.text8';"
MsgBox ("Your password has now been updated")
End If
End If
End If
End Sub
in this code text0 is previous password
text2 in the new password and
text8 is the username
the code runs fine but does not update the value in the table