tugas 3.2


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

Private Sub cmdkluar_Click()
Unload Me
End Sub

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

Private Sub cmdproses_Click()
Dim S As String
txt.Text = "20" & Left(txtnpm.Text, 2)
S = Mid(txtnpm.Text, 3, 1)
If S = "1" Then
txtjur.Text = "SISTEM INFORMASI"
elseif s = "2" Then
txtjur.Text = "MENEJEMEN IFORMTIKA"
elseif S = "3" Then
txtjur.Text = "TEHNIK INFORMATIKA"
elseif s= "4" Then
txtjur.Text = "MANAJEMEN & KOM.AKUNTANSI"
S = Mid(txtnpm.Text, 4, 2)
If S = "01" Then
txtps.Text = "setrata satu"
elseif S = "02" Then
txtps .Text = "diploma tiga"
elseif S = "03" Then
txtps.Text = "diploma empat"
If S = "04" Then
txtps.Text = "diploma dua"
End If
txturut.Text = Right(txtnpm.Text, 3)
End Sub


Private Sub Form_Load()
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.sefocus
End If

End Sub


Komentar

Postingan Populer