Tampilan Utama :
Component :
Label1 Caption Login HereLabel2 Caption Username
Label3 Caption Password
Text1 Caption ( Kosong )
Name txt_user
Text2 Caption ( Kosong )
Name txt_pass
Command1 Caption Login
Name cmd_log
Command2 Caption Cancel
Name cmd_can
Coding !!
Private Sub cmd_log_Click()
If Len(Trim(txt_user.Text)) = 0 Then
MsgBox "Isikan User", vbExclamation, "P E R I N G A T A N"
txt_user.SetFocus
Exit Sub
End If
If Len(Trim(txt_pass.Text)) = 0 Then
MsgBox "Isikan Password"
txt_user.SetFocus
Exit Sub
End If
Set rs = New ADODB.Recordset
users = txt_user.Text
With txt_pass
.SetFocus
.SelLength = 0
.SelStart = Len(Trim(.Text))
MenuUtama.Show
End With
End Sub
Private Sub cmd_can_Click()
End
End Sub
Untuk menambahkan modul,
caranya : klik kanan pada login > pilih add modul .
Tuliskan ini di modul :
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim i As Integer
Tampilan Akhir :