|
-
Apr 13th, 2000, 08:05 AM
#1
Thread Starter
Member
Hello, I am having some trouble getting my little cheap password screen to work like I want...Heres what Im trying to get: if the UserName is blank at any time..you get a popup saying theres no username...but if the password is right AND user name has text in it the program opens...heres my code:
Private Sub cmdOK_Click()
If txtUserName = "" Then
MsgBox " Enter A Valid User Name!"
LoginSucceeded = False
txtUserName.SetFocus
End If
If txtPassword = "password" Then
LoginSucceeded = True
Me.Hide
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
If LoginSucceeded = True Then
Form1.Visible = True
Form1.Label1.Caption = "User: " & frmLogin.txtUserName & "..Active"
End If
So far all it does on the username popup message but if the password is right it opens anyway...sorry if this is confusing im still new...thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|