NPM NAMA ENTER

4

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txturut.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
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
txttm.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 = “Manajemen Informatika”
ElseIf S = “3” Then
txtjur.Text = “Tehnik Informatika”
ElseIf S = “4” Then
txtjur.Text = “Manajemen & Komp. Akuntansi”
End If
S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtps.Text = “Strata Satu”
ElseIf S = “2” Then
txtps.Text = “Diploma Tiga”
ElseIf S = “3” Then
txtps.Text = “Diploma Empat”
ElseIf S = “4” Then
txtps.Text = “Diploma Dua”
End If
txturut.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)
If KeyAscii = 13 Then
Dim S As String
txttm.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 = “Manajemen Informatika”
ElseIf S = “3” Then
txtjur.Text = “Tehnik Informatika”
ElseIf S = “4” Then
txtjur.Text = “Manajemen & Komp. Akuntansi”
End If

S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtps.Text = “Strata Satu”
ElseIf S = “2” Then
txtps.Text = “Diploma Tiga”
ElseIf S = “0” Then
txtps.Text = “Diploma Empat”
ElseIf S = “4” Then
txtps.Text = “Diploma Dua”
End If
txturut.Text = Right(txtnpm.Text, 3)
End If
End Sub

Tinggalkan komentar