Selasa, 12 Desember 2017

TUGAS 3.2

TUGAS 3.2


source kode :

Private Sub Cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = ""
txtnpm.Text = ""
txtjuru.Text = ""
txtps.Text = ""
txtmasuk.Text = ""
txturut.Text = ""
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = ""
txtnpm.Text = ""
txtjuru.Text = ""
txtps.Text = ""
txtmasuk.Text = ""
txturut.Text = ""
End Sub
Private Sub Cmdproses_Click()
Dim dika As String
txtmasuk.Text = "20" & Left(txtnpm.Text, 2)
dika = Mid(txtnpm.Text, 3, 1)
If dika = "1" Then
txtjuru.Text = "Sistem Informasi"
ElseIf dika = "2" Then
txtjuru.Text = "Manajemen Informatika"
ElseIf dika = "3" Then
txtjuru.Text = "Tehnik Informatika"
ElseIf dika = "4" Then
txtjuru.Text = "Manajemen & Komp. Akuntansi"
End If
dika = Mid(txtnpm.Text, 4, 2)
If dika = "01" Then
txtps.Text = "Strata Satu"
ElseIf dika = "02" Then
txtps.Text = "Diploma Tiga"
ElseIf dika = "03" 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 = ""
txtjuru.Text = ""
txtps.Text = ""
txtmasuk.Text = ""
txturut.Text = ""
End Sub
Private Sub Txtnama_Keypress(Keyascii As Integer)
If Keyascii = 13 Then
txtnpm.SetFocus
End If

End Sub

Tidak ada komentar:

Posting Komentar

Popular Posts

Followers

About