tugas vb pulang petang

Gambar

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnik.Text = “”

Txtgol.Text = “”

txtkode.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgapok.Text = “”

txttun.Text = “”

txttoga.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 = “”

txttun.Text = “”

txttoga.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Select Case n = Mid(txtnik.Text, 5, 1)

Case n = “A”

Txtgol = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “4000000″

txttun.Text = “1025000″

Case n = “B”

Txtgol.Text = “B”

txtjabatan.Text = “Ka.SEKSI”

txtgapok.Text = “3500000″

txttun.Text = “975000″

Case n = “C”

Txtgol.Text = “C”

txtjabatan.Text = “STAFF”

txtgapok.Text = “3000000″

txttun.Text = “925000″

End Select

n= Right(txtnik.Text, 3)

If  n = “KEU” Then

txtbagian.Text = “ACCOUNTING”

ElseIf n = “ADM” Then

txtbagian.Text = “ADMINISTRASI”

ElseIf n = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

ElseIf n = “EDP” Then

txtbagian.Text = “IT UNIT”

ElseIf n = “SPM” Then

txtbagian.Text = “SECURITY”

End If

Select Case n = Mid(txtnik.Text, 7, 1)

Case n = “S”

kode = “S”

Status = “SINGEL”

Case n= “M”

kode = “M”

Status = “MENIKAH”

Case n = “J”

kode = “J”

Status = “JANDA”

Case n = “D”

kode = “D”

Status = “DUDA”

End Select

txtkode.Text = kode

txtstatus.Text = Status

txttahun.Text = Left(txtnik.Text, 4)

txttoga.Text = Val(txtgapok.Text) + Val(txttun.Text)

End Sub

 

Private Sub Form_Activate()

txtnama.SetFocus

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnik.SetFocus

End If

End Sub

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s