You are on page 1of 2

Private Sub btutup_Click()

Unload Me
menu.Show
End Sub
Private Sub Form_Activate()
For Each k In Me.Controls
If TypeOf k Is TextBox Then
k.Enabled = False
End If
Next
tkduser = menu.Statbar.Panels(1).Text
tlama.Enabled = True
tlama.SetFocus
tlama.PasswordChar = "*"
tbaru.PasswordChar = "*"
tkonf.PasswordChar = "*"
End Sub
Private Sub Form_Load()
End Sub
Private Sub tbaru_Change()
End Sub
Private Sub tbaru_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
tkonf.Enabled = True
tkonf.SetFocus
End If
End Sub
Private Sub tkonf_Change()
End Sub
Private Sub tkonf_KeyPress(KeyAscii As Integer)
Call koneksi
If KeyAscii = 13 Then
If tkonf.Text <> tbaru.Text Then
MsgBox "password telah diupdate"
Call Form_Activate
tlama = ""
End If
End If
End Sub
Private Sub tlama_Change()
End Sub
Private Sub tlama_KeyPress(KeyAscii As Integer)
Call koneksi
If KeyAscii = 13 Then
rsuser.Open "Select * from login where password='" & tlama.Text & "'", kon
If rsuser.EOF Then
MsgBox "password" + tlama.Text + "tidak ada"
tlama.SetFocus
Else
tbaru.Enabled = True
tbaru.SetFocus
End If
End If
End Sub

You might also like