Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub cmdExit_Click()
- End
- End Sub
- Private Sub cmdOK_Click()
- Call Koneksi
- If txtNama.Text = "" Then
- MsgBox "NAMA USER MASIH KOSONG !", vbCritical + vbOKOnly, "Error"
- txtNama.SetFocus
- ElseIf txtPassword.Text = "" Then
- MsgBox "PASSWORD MASIH KOSONG !", vbCritical + vbOKOnly, "Error"
- txtPassword.SetFocus
- Else
- SQL = ""
- SQL = "SELECT * FROM user " _
- & "WHERE Nama='" & txtNama.Text & "' " _
- & " AND Password='" & txtPassword.Text & "'"
- Set rsPeriksa = conn.Execute(SQL)
- If Not rsPeriksa.BOF Then
- Unload Me
- frmUtama.Show
- Else
- MsgBox "ANDA BUKAN USER YANG BERHAK!", vbCritical + vbOKOnly, "Error"
- End If
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment