struntz
Nov 19th, 1999, 08:38 AM
Hello i am having some problems i tried de-bugging the problem but i am just learning how to debug properly i have found out that the values of Pass and UserName go to "" after like the 4th try it works somtimes and then it stops here is the CODE:
Private Sub Command1_Click()
Dim Pass As String, UserName As String
Pass = txtPass.Text
UserName = txtUser.Text
If UserName = "Cory" And Pass = "hello" Then
MsgBox "PassWord Confirmed", 12, "Thank You"
Load Form1
Form1.Show
frmPass.Visible = False
Else
MsgBox "Incorrect Password", 8, "Please try again"
End If
End Sub
can someone please tell me what i am doing wrong in this code? the password program opens when the program is first ran.. . it comes up and then u must enter a username and then a passsword the text boxes are named:
txtUser 'user name
txtPass 'Password
THanks for your time!
------------------
Cory Sanchez
Young Student
ICQ#: 18640149
Private Sub Command1_Click()
Dim Pass As String, UserName As String
Pass = txtPass.Text
UserName = txtUser.Text
If UserName = "Cory" And Pass = "hello" Then
MsgBox "PassWord Confirmed", 12, "Thank You"
Load Form1
Form1.Show
frmPass.Visible = False
Else
MsgBox "Incorrect Password", 8, "Please try again"
End If
End Sub
can someone please tell me what i am doing wrong in this code? the password program opens when the program is first ran.. . it comes up and then u must enter a username and then a passsword the text boxes are named:
txtUser 'user name
txtPass 'Password
THanks for your time!
------------------
Cory Sanchez
Young Student
ICQ#: 18640149