Tugas 3.2

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = ""
txtnpm = ""

txtjur = ""
txtps = ""
txttm = ""
txturut = ""
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = ""
txtnpm = ""
txtjur = ""
txtps = ""
txttm = ""
txturut = ""
End Sub

Private Sub cmdproses_Click()
Dim H As String
txttm.Text = "20" & Left(txtnpm.Text, 2)
H = Mid(txtnpm.Text, 3, 1)
If H = "1" Then
txtjur.Text = "Sistem Informasi"
ElseIf H = "2" Then
txtjur.Text = "Manajemen Informatika"
ElseIf H = "3" Then
txtjur.Text = "Tehnik Informatika"
ElseIf H = "4" Then
txtjur.Text = "Manajemen & Komp. Akutansi"
End If
H = Mid(txtnpm.Text, 4, 2)
If H = "01" Then
txtps.Text = "Strata Satu"
ElseIf H = "02" Then
txtps.Text = "Diploma Tiga"
ElseIf H = "03" Then
txtps.Text = "Diploma Empat"
ElseIf H = "02" Then
txtps.Text = "Diploma Dua"
End If
txturut.Text = Right(txtnpm.Text, 3)
End Sub

Private Sub Form_activate()
txtnama.SetFocus
txtnama.Text = ""
txtnpm.Text = ""
txtjur.Text = ""
txtps.Text = ""
txttm.Text = ""
txturut.Text = ""
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub

Komentar

Postingan populer dari blog ini