Hi I have written my If statement as follows:
If Me.Passwd1 <> Me.Passwd1 Then
MsgBox "Passwords do not match!"
Me.Passwd1 = ""
Me.Passwd2 = ""
Me.Passwd1.SetFocus
Else
Me.password = Me.Passwd1
Me.DateLastUpdated = Date
Me.UpdatedBy = vUserID
Me.ResetPassword.Visible = True
Me.Passwd1label.Visible = False
Me.Passwd2Label.Visible = False
Me.Passwd1.Visible = False
Me.Passwd2.Visible = False
Me.Edit_User.SetFocus
Me.SavePassword.Visible = False
End If
But the problem is, is that it carries on with the rest of the statement it should stop after the msgbox. Thanks
If Me.Passwd1 <> Me.Passwd1 Then
MsgBox "Passwords do not match!"
Me.Passwd1 = ""
Me.Passwd2 = ""
Me.Passwd1.SetFocus
Else
Me.password = Me.Passwd1
Me.DateLastUpdated = Date
Me.UpdatedBy = vUserID
Me.ResetPassword.Visible = True
Me.Passwd1label.Visible = False
Me.Passwd2Label.Visible = False
Me.Passwd1.Visible = False
Me.Passwd2.Visible = False
Me.Edit_User.SetFocus
Me.SavePassword.Visible = False
End If
But the problem is, is that it carries on with the rest of the statement it should stop after the msgbox. Thanks