Hi everyone,
I have a login form that opens the change password form if certain criteria are met. The new change password form opens and has three text boxes. If for instance a user forgets to enter their new password or their password doesn't match a message box stating what the user did wrong. However, after they click Ok on these message the original login form continues to proceed. How do I prevent it from auto closing the change password form if a message box pops up etc. If I run the change password form separately it works without issues, it is only when I open it from the Login Form.
Below is the code for opening the change password form from the login form.
I have a login form that opens the change password form if certain criteria are met. The new change password form opens and has three text boxes. If for instance a user forgets to enter their new password or their password doesn't match a message box stating what the user did wrong. However, after they click Ok on these message the original login form continues to proceed. How do I prevent it from auto closing the change password form if a message box pops up etc. If I run the change password form separately it works without issues, it is only when I open it from the Login Form.
Below is the code for opening the change password form from the login form.
Code:
If passwordReset = "1" Then
MsgBox("Your password has been reset. Please enter a new password.", MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, projectName & " Login")
If changePassword.ShowDialog() = Windows.Forms.DialogResult.Yes Then
success = True
Else
success = False
End If
End If