Hello evryone:



I am new in programming and I am using VB2005.

I have a program where I have created an Add new user form and a Reset Password form.



When I create a new user I have setup a default password "Support", I have setup an IF statement that when the user logs in that if the password = 'Support" to bring up the Reset password form, where they would create a new one of their own



I have added a HashPassword feature to my code: The code to hash the password is the following:

HTML Code:
Private Function HashPassword(ByVal password As String) As _
    String
    Dim hash As String = ""
    Dim i As Integer
    For i = 0 To password.Length - 1
        hash &= Chr(Asc(password.Substring(i, 1)) + 1)
    Next i
    Return hash
End Function

In the OK event when I first login I have the following:
HTML Code:
IF TextPassword.text = "Support" Then

Msgbox = "Please change your Temporary password now", vbOKOnly

ResetpasswordForm.Show()

Exit sub

End if

The problem is that is, if I type "Support" under tha password textbox, it doesn't display the resetPasswordForm, it just take me into the program.



What am I missing?



Thanks and I hope I am making sense.