txtnama.Text = ""
txtnik.Text = ""
Txtgol.Text = ""
txtkode.Text = ""
txtstatus.Text = ""
txttahun.Text = ""
txtjabatan.Text = ""
txtbagian.Text = ""
txtgaji.Text = ""
txttj.Text = ""
txttotal.Text = ""
txtnama.SetFocus
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdlagi_Click()
txtnama.Text = ""
txtnik.Text = ""
Txtgol.Text = ""
txtkode.Text = ""
txtstatus.Text = ""
txttahun.Text = ""
txtjabatan.Text = ""
txtbagian.Text = ""
txtgaji.Text = ""
txttj.Text = ""
txttotal.Text = ""
txtnama.SetFocus
End Sub
Private Sub cmdproses_Click()
Dim S As String
txttahun.Text = Left(txtnik.Text, 4)
S = Mid(txtnik.Text, 5, 1)
If S = "A" Then
Txtgol.Text = "A"
txtjabatan.Text = "Manajemen"
txtgaji.Text = "4000000"
txttj.Text = "1025000"
ElseIf S = "B" Then
Txtgol.Text = "B"
txtjabatan.Text = "Ka. Seksi"
txtgaji.Text = "3500000"
txttj.Text = "975000"
ElseIf S = "C" Then
Txtgol.Text = "C"
txtjabatan.Text = "Staff"
txtgaji.Text = "3000000"
txttj.Text = "925000"
End If
S = Mid(txtnik.Text, 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
S = Right(txtnik.Text, 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
txttotal.Text = Val(txtgaji.Text) + Val(txttj.Text)
End Sub
Tidak ada komentar:
Posting Komentar