TUGAS1

Private Sub Cmdbatal_Click()

kosong

End Sub

Private Sub cmdlagi_Click()

kosong

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 Form_load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub

Private Sub cbogolongan_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case cbogolongan

Case “I”

gapok = 3500000

tunjangan = 350000

Case “II”

gapok = 2400000

tunjangan = 240000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 1000000

tunjangan = 100000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok = gapok

txttunjangan = tunjangan

txtpajak = pajak

txttotal = total – pajak

End Sub

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

Public Sub kosong()

txtnidn.SetFocus

txtnidn = “”

txtnama = “”

cbogolongan = “”

txtgapok = “”

txttunjangan = “”

txtpajak = “”

txttotal = “”

End Sub

 

 

Private Sub txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnama.SetFocus

End If

End Sub

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form2.Show

End Sub

Iklan