Tugas 14 PT Pulang Petang

Untitled

Private Sub form_activate()
TXTMNK.SetFocus
End Sub
Private Sub cmdproses_Click()
Dim r As String

r = Mid(TXTMN.Text, 5, 1)
If r = “A” Then
TXTG = “A”
TXTJ.Text = “MANAGER”
TXTGP.Text = “4000000”
TXTTN.Text = “1025000”
ElseIf r = “B” Then
TXTG.Text = “B”
TXTJ.Text = “KEPALA SEKSI”
TXTGP.Text = “3500000”
TXTTN.Text = “975000”
ElseIf r = “C” Then
TXTG.Text = “C”
TXTJ.Text = “STAFF”
TXTGP.Text = “3000000”
TXTTN.Text = “925000”
End If
r = Right(TXTMN.Text, 3)
If r = “KEU” Then
TXTB.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
TXTB.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
TXTB.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
TXTB.Text = “IT UNIT”
ElseIf r = “SPM” Then
TXTB.Text = “SECURITY”
End If
r = Mid(TXTMN.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
TXTKS.Text = kode
TXTS.Text = Status
TXTT.Text = Left(TXTMN.Text, 4)
TXTTG.Text = Val(TXTGP.Text) + Val(TXTTN.Text)
End Sub
Private Sub cmdlagi_Click()
TXTMNK.SetFocus
TXTMNK.Text = “”
TXTMN.Text = “”
TXTG.Text = “”
TXTKS.Text = “”
TXTS.Text = “”
TXTT.Text = “”
TXTJ.Text = “”
TXTB.Text = “”
TXTGP.Text = “”
TXTTN.Text = “”
TXTTG.Text = “”
End Sub

Private Sub txtmnk_KeyPress(keyascii As Integer)
If keyascii = 13 Then
TXTMN.SetFocus
End If
End Sub

Private Sub cmdbatal_Click()
TXTMNK.SetFocus
TXTMNK.Text = “”
TXTMN.Text = “”
TXTG.Text = “”
TXTKS.Text = “”
TXTS.Text = “”
TXTT.Text = “”
TXTJ.Text = “”
TXTB.Text = “”
TXTGP.Text = “”
TXTTN.Text = “”
TXTTG.Text = “”
End Sub
Private Sub cmdkeluar_Click()
End
End Sub

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s