TUGAS DATA BASE 4

111

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub
Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdproses_Click()
Dim s As String
txttahun.Text = “20″ &Left(txtnpm.Text, 2)
s = Mid(txtnpm.Text, 3, 1)
If s = “1″ Then
txtjurusan.Text = “SistemInformasi”
ElseIf s = “2″ Then
txtjurusan.Text = “tekhnikInformasi”
ElseIf s = “3″ Then
txtjurusan.Text = “ManajemenInformatika”
ElseIf s = “4″ Then
txtjurusan.Text = “komputerakutansi”
End If
s = Mid(txtnpm.Text, 4, 2)
If s = “01″ Then
txtps.Text = “Strata Satu”
ElseIf s = “02″ Then
txtps.Text = “Diploma empat”
ElseIf s = “03″ Then
txtps.Text = “Diploma Tiga”
ElseIf s = “04″ Then
txtps.Text = “Diploma Dua”
End If
txtnurut.Text = Right(txtnpm.Text, 3)
End Sub
Private Sub cmdsimpan_Click()
Data1.Recordset.Update
End Sub

Tinggalkan komentar