Blog Post


Biyernes, Marso 6, 2015

Visual Basic 6.0 : Advance Login System

Sample Codes Here:
(frmLogin)
Private Sub cmdL_Click()

Dim rs As New ADODB.Recordset

rs.Open "Select * from tblLogin", con, adOpenDynamic
If Not rs.EOF Then

If txtU.Text = rs!User And txtP.Text = rs!Pass Then
MsgBox "Welcome User", vbInformation, "Message"
Unload Me
frmSample.Show

Else

MsgBox "Access Denied!", vbCritical, "Message"

End If
End If
End Sub

(frmCreate)

Private Sub cmdL_Click()
Dim a As String

a = MsgBox("Are you sure you want to Create Account?", vbQuestion + vbYesNo, "Message")
If a = vbYes Then
con.Execute "insert into tblLogin values('" & txtU.Text & "','" & txtP.Text & "')"
MsgBox "Saved!", vbInformation, "Message"
txtU.Text = ""
txtP.Text = ""

Exit Sub

End If
End Sub
Watch video below

0 (mga) komento:

Mag-post ng isang Komento