tugas 9

GAMBAR I

Private Sub Cmdbatal_Click()
txtmnk.SetFocus
txtmnk.Text = “”
Txtgol.Text = “”
Txtkode.Text = “”
Txtstatus.Text = “”
Txttahun.Text = “”
Txtjabatan.Text = “”
Txtbagian.Text = “”
txtgapok.Text = “”
Txttunjangan.Text = “”
Txttotal.Text = “”

End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdproses_Click()
r = Mid(Txtnpm.Text, 5, 1)
If r = “A” Then
Txtgol = “A”
Txtjabatan.Text = “MANAGER”
txtgapok.Text = “4000000”
Txttunjangan.Text = “1025000”
ElseIf r = “B” Then
Txtgol.Text = “B”
Txtjabatan.Text = “Ka.SEKSI”
txtgapok.Text = “3500000”
Txttunj.Text = “975000”
ElseIf r = “C” Then
Txtgol.Text = “C”
Txtjabatan.Text = “STAFF”
txtgapok.Text = “3000000”
Txttunjangan.Text = “925000”
End If
r = Right(Txtnpm.Text, 3)
If r = “KEU” Then
Txtbagian.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
Txtbagian.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
Txtbagian.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
Txtbagian.Text = “IT UNIT”
ElseIf r = “SPM” Then
Txtbagian.Text = “SECURITY”
End If
r = Mid(Txtnpm.Text, 7, 1)
If r = “S” Then
kode = “S”
Status = “SINGLE”
ElseIf r = “M” Then
kode = “M”
Status = “MENIKAH”
ElseIf r = “J” Then
kode = “J”
Status = “JANDA”
ElseIf r = “D” Then
kode = “D”
Status = “DUDA”
End If
Txtkode.Text = kode
Txtstatus.Text = Status
Txttahun.Text = Left(Txtnpm.Text, 4)
Txttotal.Text = Val(txtgapok.Text) + Val(Txttunjangan.Text)

End Sub

Private Sub Form_Activate()
txtmnk.SetFocus
End Sub

Private Sub txtmnk_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