Computing.Net > Forums > Programming > Password Help for VB 6

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Password Help for VB 6

Reply to Message Icon

Name: Rider3
Date: November 30, 2004 at 07:22:43 Pacific
OS: Windows XP
CPU/Ram: Pentium 4 / 512
Comment:

I am currently doin a small college project. I have two forms 1)The password entry form 2) Password change form.

The password entry form code is this:
Private Sub cmd1_Click()
Dim code As String
code = "WPA"

If Text1.Text = code Then
Form3.Show
Else
MsgBox (" Incorrect Password.. Password entry is case sensitive")
End If

End Sub

The Password change form is this:

Private Sub Command1_Click()
Dim Password As String
code = "WPA"

If Text1.Text = code And Text2.Text = Text3.Text Then
MsgBox ("Password Changed")
Form8.Hide
Else
MsgBox (" Either the new passwords do not match or the old password is incorrect")
End If
End Sub

I need the password change form to change the original password. The original password is static.
How do i do this.

Thanks
Jase



Sponsored Link
Ads by Google

Response Number 1
Name: Infinite Recursion
Date: November 30, 2004 at 07:45:55 Pacific
Reply:

I think you are able to prefex the form name to the component name in order to assign values across forms... haven't coded in VB6 in a while...

Take the following for instance:

Form1 - Password Entry
txtPassword.Text - Password component

Form2 - Password Change

In Form2, you could have in your onclick event to change Form1.txtPassword.Text = 'value'

Give that a try.


0

Response Number 2
Name: edga_dave
Date: November 30, 2004 at 09:22:23 Pacific
Reply:

Try:

If Text1.Text = code And Text2.Text = Text3.Text Then
code = Text2.Text
MsgBox ("Password Changed")
Form8.Hide
Else
MsgBox (" Either the new passwords do not match or the old password is incorrect")
End If
End Sub


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Password Help for VB 6

I need help about vb 6.0 www.computing.net/answers/programming/i-need-help-about-vb-60/5404.html

VB 6.0 Coding www.computing.net/answers/programming/vb-60-coding/18507.html

Vb 6.0 www.computing.net/answers/programming/vb-60/18825.html