Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 IfEnd 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 SubI need the password change form to change the original password. The original password is static.
How do i do this.Thanks
Jase

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 componentForm2 - Password Change
In Form2, you could have in your onclick event to change Form1.txtPassword.Text = 'value'
Give that a try.

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

![]() |
![]() |
![]() |

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