TUGAS6

 

Private Sub Cmdbatal_Click()

Textnama.SetFocus

Textnama = “”

Textnik = “”

Textgolongan = “”

Textkodeset = “”

Textstatus = “”

Textahun = “”

Textjabaatan = “”

Textbagian = “”

Textgajipok = “”

Texttunjangan = “”

Texttotal = “”

End Sub

 

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

Textnama.SetFocus

Textnama = “”

Textnik = “”

Textgolongan = “”

Textkodeset = “”

Textstatus = “”

Texttahun = “”

Textjabatan = “”

Textbagian = “”

Textgajipok = “”

Texttunjangan = “”

Texttotal = “”

End Sub

 

Private Sub cmdproses_Click()

Dim A As String

A = Mid(Textnik.Text, 5, 1)

If A = “A” Then

Textgolongan.Text = “A”

Textjabatan.Text = “MANAGER”

Textgajipok.Text = “4000000”

Texttunjangan.Text = “1025000”

ElseIf A = “B” Then

Textgolongan.Text = “B”

Textjabatan.Text = “Ka.SEKSI”

Textgajipok.Text = “3500000”

Texttunjangan.Text = “975000”

ElseIf A = “C” Then

Textgolongan.Text = “C”

Textjabatan.Text = “STAFF”

Textgajipok.Text = “3000000”

Texttunjangan.Text = “925000”

End If

A = Right(Textnik.Text, 3)

If A = “KEU” Then

Textbagian.Text = “ACCOUNTING”

ElseIf A = “ADM” Then

Textbagian.Text = “ADMINISTRASI”

ElseIf A = “SDM” Then

Textbagian.Text = “GENERAL AFFAIR”

ElseIf A = “EDP” Then

Textbagian.Text = “IT UNIT”

ElseIf A = “SPM” Then

Textbagian.Text = “SECURITY”

End If

A = Mid(Textnik.Text, 7, 1)

If A = “S” Then

kode = “S”

Status = “SINGLE”

ElseIf A = “M” Then

kode = “M”

Status = “MENIKAH”

ElseIf A = “J” Then

kode = “J”

Status = “JANDA”

ElseIf A = “D” Then

kode = “D”

Status = “DUDA”

End If

Textkodeset.Text = kode

Textstatus.Text = Status

Texttahun.Text = Left(Textnik.Text, 4)

Texttotal.Text = Val(Textgajipok.Text) + Val(Texttunjangan.Text)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnik.SetFocus

End If

End Sub

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

Iklan