tugas 7

GAMBAR G

Private Sub cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
txtjurusan.Text = “”
txtpstudi = “”
txttahun.Text = “”
txtnurut.Text = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
txtjurusan.Text = “”
txtpstudi = “”
txttahun.Text = “”
txtnurut.Text = “”
End Sub

Private Sub Cmdproses_Click()
Dim s As String
txttahun.Text = “20” & Left(Txtnpm.Text, 2)
s = Mid(Txtnpm.Text, 3, 1)
If s = “1” Then
txtjurusan.Text = “sistem informasi”
txtpstudi = “strata satu”
txtbp.Text = “1950000”
ElseIf s = “2” Then
txtjurusan.Text = “menejemen informatika”
txtpstudi = “diploma tiga”
txtbp.Text = “1650000”
ElseIf s = “3” Then
txtjurusan.Text = “tehnik informatika”
txtpstudi = “diploma empat”
txtbp.Text = “1750000”
ElseIf s = “4” Then
txtjurusan.Text = “menejemen &komp akutansi”
txtpstudi = “diploma dua”
txtbp.Text = “1450000”
End If
txtnurut.Text = Right(Txtnpm.Text, 3)
End Sub
Private Sub form_activate()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
txtjurusan.Text = “”
txtpstudi = “”
txttahun.Text = “”
txtnurut.Text = “”
End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnpm.SetFocus
End If
End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s