Jumat, 20 Januari 2012

Form Server - Client Pegawai






FROM LOGIN
Dim i As Byte

Private Sub CommandOK_Click()
   Select Case Index
    Case 0
        PanggilMENU
    Case 1
        End
    End Select
End Sub

Private Sub Form_Load()
    NamaUser.Text = ""
    PasswordUser.Text = ""
    i = 1
End Sub

Sub PanggilMENU()
    If NamaUser.Text = "NANO" And PasswordUser.Text = "PRANATA" Then
        MsgBox "Semoga sukses..." & vbCrLf & _
            "DATA PEGAWAI RINEKA" & vbCrLf & _
            "" & vbCrLf & _
            "PEGAWAI YANG MASIH AKTIV", vbInformation + vbOKOnly, "Passsword"
        Unload Me
        Form_Menu.Show
       
   
       
    Else
        If i > 2 Then
        MsgBox "Maaf...!" & vbCrLf & _
            "Anda tidak berhak menggunakan program ini !", vbInformation + vbOKOnly, "Password"
            End
        Else
            MsgBox "Maaf...!" & vbCrLf & _
                "Password anda SALAH", vbInformation + vbOKOnly, "Password"
            End If
            NamaUser.Text = ""
            PasswordUser.Text = ""
            NamaUser.SetFocus
            i = i + 1
        End If
End Sub

Private Sub NamaUser_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If NamaUser.Text = "" Then Exit Sub
        PasswordUser.SetFocus
    End If
End Sub

Private Sub PasswordUser_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If PasswordUser.Text = "" Then Exit Sub
        CommandOK.SetFocus
    End If
End Sub
SERVERRRRRRRRRRRRRR









Tidak ada komentar:

Posting Komentar