Coba Gunaiin Listing Berikut

general
-------

Dim LoginSucceeded  as Boolean
Dim DBS as Database

Private Sub cmdlogin_Click(Index As Integer)
On Error GoTo cekloginuser

Set DBS = OpenDatabase(App.path & "\Nama Database'a ")
Set rslogin = DBS.OpenRecordset("Select * From Login where Login_User='" & 
Trim(tlogin(0).Text) & "'")
Select Case Index
    Case 0
        If Trim(tlogin(0).Text) = "" And Trim(tlogin(1).Text) = "" Then
            Pesan = MsgBox("Login User Dan Password Masih Belum Terisi !!" & 
vbCrLf & "Apakah Anda Ingin Keluar Dari Program Ini...?", vbYesNo + vbQuestion)
            If Pesan = vbYes Then
                Set Login_Form = Nothing
                UnloadAllForm
            Else
                tlogin(0).SetFocus
            End If
        ElseIf Trim(tlogin(0).Text) = "" Then
            MsgBox "Login User Masih Kosong...!", vbOKOnly + vbExclamation
            tlogin(0).SetFocus
        ElseIf Trim(tlogin(1).Text) = "" Then
            MsgBox "password Masih Kosong...!", vbOKOnly + vbExclamation
            tlogin(1).SetFocus
        Else
            If rslogin.EOF Then
                MsgBox "Login User Tidak Terdaftar...!", vbOKOnly + vbCritical, 
"PERINGATAN"
                tlogin(0).Text = ""
                tlogin(1).Text = ""
                tlogin(0).SetFocus
            Else
                If rslogin!Password <> Enkripsi(Trim(tlogin(1).Text)) Then
                    n = n + 1
                Else
                    n = 0
                    Menu_Utama.Show
                    Menu_Utama.lbluser.Caption = rslogin!User_Name
                    MenuAktif
                    Set Login_Form = Nothing
                    Unload Me
                End If
                
                Select Case n
                    Case 1
                        MsgBox "Maaf, Password Anda Salah, Anda Mempunyai 2 
Kesempatan Lagi..!", vbOKOnly + vbCritical, "PERINGATAN"
                        tlogin(1) = ""
                        tlogin(1).SetFocus
                    Case 2
                        MsgBox "Maaf, Password Anda Salah, Anda Mempunyai 1 
Kesempatan Lagi..!", vbOKOnly + vbCritical, "PERINGATAN"
                        tlogin(1) = ""
                        tlogin(1).SetFocus
                    Case 3
                        MsgBox "Maaf, Kesempatan Anda Hanya 3 Kali, Anda Harus 
Mengulanginya Dari Awal Dengan Membuka Program Penjualan Ini..!", vbOKOnly + 
vbCritical, "PERINGATAN"
                        DBS.Close
                        Set Login_Form = Nothing
                        UnloadAllForm
                End Select
            End If
        End If
    Case 1
        If LoginSucceeded = False Then
            Unload Me
        End If
End Select
On Error GoTo 0
Exit Sub
cekloginuser:
End Sub

Jangan Lupa Sebelum'a

Buka Menu Project - References
Pilih & Checklist Miscrosoft DAO 3.6 Object Library (Untuk Menggunakan DAO)

Semoga Bisa Membantu

----- Original Message ----
From: eko riantono <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, January 31, 2008 1:12:00 PM
Subject: Re: [Programmer-VB] Re: login

klo itu aku dah tahu cuma yang belum aku tahu tuh gini

data base user name dan pass ada di microsft acces nah
untuk loginnya diambil dari data base di acces yang
saya tannyakan itu cara menghubungi ke accesnya
gimana.

thks b4
--- jontampubolon <jontampubolon@ yahoo.com> wrote:

> download file "loginProg.exe" di menu Files.
> 
> 

____________ _________ _________ _________ _________ _________ _
Never miss a thing. Make Yahoo your home page. 
http://www.yahoo. com/r/hs




      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Kirim email ke