Blaze2002
New Member
- Joined
- Mar 2, 2004
- Messages
- 13
Hiya evry1! rite i have a form in visual basics that i want to protect using a login thingie! i have 3 codes that work fine together:
Public declorations:
Dim x As String
Dim y As String
Dim loginsucceeded As Boolean
Cancel button:
Private Sub CommandButton1_Click()
If MsgBox(" Are you sure you want to cancel log in?", vbYesNo) = vbYes Then
End
End If
End Sub
and the login section:
Private Sub CommandButton2_Click()
x = "user"
y = "admin"
If txtpassword = y And txtusername = y Then
FRMwk1.Show
loginsucceeded = True
Unload Me
Else
If txtpassword = x And txtusername = x Then
FRMwk1.Show
loginsucceeded = True
Unload Me
Else
If loginsucceeded = False Then
MsgBox ("Please enter correct name and password")
End If
End If
End If
End Sub
This all works fine till i want to put in a password and username! where in the code can i tell VB what the password and username is and when i type it in how can i get it to show "******" instead of the letters??
Public declorations:
Dim x As String
Dim y As String
Dim loginsucceeded As Boolean
Cancel button:
Private Sub CommandButton1_Click()
If MsgBox(" Are you sure you want to cancel log in?", vbYesNo) = vbYes Then
End
End If
End Sub
and the login section:
Private Sub CommandButton2_Click()
x = "user"
y = "admin"
If txtpassword = y And txtusername = y Then
FRMwk1.Show
loginsucceeded = True
Unload Me
Else
If txtpassword = x And txtusername = x Then
FRMwk1.Show
loginsucceeded = True
Unload Me
Else
If loginsucceeded = False Then
MsgBox ("Please enter correct name and password")
End If
End If
End If
End Sub
This all works fine till i want to put in a password and username! where in the code can i tell VB what the password and username is and when i type it in how can i get it to show "******" instead of the letters??