Whizard Innovation
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
PortalHomeGallerySearchLatest imagesRegisterLog in

 

 sample sql T_T

Go down 
AuthorMessage
[Whiz]~Czechoslovakia
Admin
Admin



Male Number of posts : 111
Age : 34
Location : Antipolo City
Job/hobbies : Web Page Designing, Flash Animation, Software Modification, Image Editing, Gathering Intelligence, T
Registration date : 2008-04-12

sample sql T_T Empty
PostSubject: sample sql T_T   sample sql T_T Icon_minitimeFri Nov 28, 2008 2:06 pm

Option Explicit

Public LoginSucceeded As Boolean
-----------------------------------------------------
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
Me.Hide
End Sub
---------------------------------------------------------
Private Sub cmdOK_Click()
'check for any record, if there is no record there could be error when looping
If Data1.Recordset.RecordCount = 0 Then
MsgBox ("No recordset")
Exit Sub
End If
'check for correct username and password
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
If txtUserName = Data1.Recordset.Fields("Username") Then
If txtPassword = Data1.Recordset.Fields("Password") Then
LoginSucceeded = True
Me.Hide
Form1.Show
End If
End If
Data1.Recordset.MoveNext
Loop
If Not LoginSucceeded Then
MsgBox "Invalid UserName/Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
Back to top Go down
http://whiz.forumotion.com
 
sample sql T_T
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Whizard Innovation :: Whiz Tutorial :: Visual Basic Tutorial-
Jump to: