Selasa, 12 Desember 2017

Tugas 3.2 STMIK PRINGSEWU

Tugas 3.2 STMIK PRINGSEWU


Source Codenya:

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = ""
txtnpm = ""
txtjur = ""
txtps = ""
txtnu = ""
txttm.Text = ""
End Sub

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

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub Form_Activate()
txtnama.SetFocus
txtnama = ""
txtnpm = ""
txtjur = ""
txtps = ""
txtnu = ""
End Sub


Private Sub cmdproses_Click()
Dim R As String
txttm.Text = "20" & Left(txtnpm.Text, 2)
R = Mid(txtnpm.Text, 3, 1)
If R = "1" Then
txtjur.Text = "Sistem Informasi"
ElseIf R = "2" Then
txtjur.Text = "Manajemen Informatika"
ElseIf R = "3" Then
txtjur.Text = "Teknik Informatika"
ElseIf R = "4" Then
txtjur.Text = "Manajemen & Komp.Akuntansi"
End If
R = Mid(txtnpm.Text, 4, 2)
If R = "01" Then
txtps.Text = "Strata satu"
ElseIf R = "02" Then
txtps.Text = "Diploma 1"
ElseIf R = "03" Then
txtps.Text = "Diploma 2"
ElseIf R = "04" Then
txtps.Text = "Diploma 3"
End If
txtnu.Text = Right(txtnpm.Text, 3)
End Sub

Private Sub txtnama_keypress(keyascii As Integer)
If keyascii = 13 Then
txtnpm.SetFocus
End If
End Sub

Private Sub txtnpm_keypress(keyascii As Integer)
Dim R As String
txttm.Text = "20" & Left(txtnpm.Text, 2)
R = Mid(txtnpm.Text, 3, 1)
If R = "1" Then
txtjur.Text = "Sistem Informasi"
ElseIf R = "2" Then
txtjur.Text = "Manajemen Informatika"
ElseIf R = "3" Then
txtjur.Text = "Teknik Informatika"
ElseIf R = "4" Then
txtjur.Text = "Manajemen & Komp.Akuntansi"
End If
R = Mid(txtnpm.Text, 4, 2)
If R = "01" Then
txtps.Text = "Strata satu"
ElseIf R = "02" Then
txtps.Text = "Diploma 1"
ElseIf R = "03" Then
txtps.Text = "Diploma 2"
ElseIf R = "04" Then
txtps.Text = "Diploma 3"
End If
txtnu.Text = Right(txtnpm.Text, 3)
End Sub

0 komentar:

Posting Komentar