Author : Baker Boy
Date Submitted : 10/12/2005
Category : Other
Compatibility : .NET,VB 6
This code has been accessed 6177 times.
Task : This is a basic password/login form
Declarations
Code
Private Sub Command1_Click()
try = try - 1
If try = 0 then
msgbox "Sorry username and password incorrect three times please go away",vbinformation, "Bla"
End
End If
username = {textbox name}
password = {textbox name}
If (username = {textbox name}) and (password = {textbox name}) then
msgbox "Well done", vbinformation, "Bla"
load {formname}
else
msgbox "sorry", vbinformation, "Bla"
{textbox name for username} = ""
{textbox name for password} = ""
{textbox name for username.SetFocus
End if
End Sub
Form_Load()
try = 3
End Sub