tugas 14 program pt.pulang petang

PROSES 3

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnik.SetFocus

End If

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

Txttahun.Text = Left(Txtnik, 4)

S = Mid(Txtnik, 5, 1)

If S = “A” Then

Txtgol.Text = “A”

Txtjabatan.Text = “Manager”

Txtgapok.Text = “4000000”

Txttunjangan = “1025000”

ElseIf S = “B” Then

Txtgol.Text = “B”

Txtjabatan.Text = “Ka. Seksi”

Txtgapok.Text = “3500000”

Txttunjangan = “975000”

ElseIf S = “C” Then

Txtgol.Text = “C”

Txtjabatan.Text = “Staff”

Txtgapok.Text = “3000000”

Txttunjangan = “925000”

End If

S = Right(Txtnik, 3)

If S = “KEU” Then

Txtbagian.Text = “Accounting”

ElseIf S = “ADM” Then

Txtbagian.Text = “Administrasi”

ElseIf S = “SDM” Then

Txtbagian.Text = “General Affair”

ElseIf S = “EDP” Then

Txtbagian.Text = “IT Unit”

ElseIf S = “SPM” Then

Txtbagian.Text = “Security”

End If

S = Mid(Txtnik, 7, 1)

If S = “S” Then

Txtkode.Text = “S”

Txtstatus.Text = “Single”

ElseIf S = “M” Then

Txtkode.Text = “M”

Txtstatus.Text = “Menikah”

ElseIf S = “J” Then

Txtkode.Text = “J”

Txtstatus.Text = “Janda”

ElseIf S = “D” Then

Txtkode.Text = “D”

Txtstatus.Text = “Duda”

End If

Txttotal.Text = Val(Txtgapok.Text) + Val(Txttunjangan)

End Sub

 

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnik.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 Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnik.Text = “”

Txtgol.Text = “”

Txtkode.Text = “”

Txtstatus.Text = “”

Txttahun.Text = “”

Txtjabatan.Text = “”

Txtbagian.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txttotal.Text = “”

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 )

Connecting to %s