UTS VB-PRAKTIKUM

Private Sub Cmdbatal_Click()

txtnk.SetFocus

txtgol.Text = “”

txtks.Text = “”

txtst.Text = “”

txtth.Text = “”

txtjb.Text = “”

txtbg.Text = “”

txtgp.Text = “”

txttj.Text = “”

txttg.Text = “”

txtnk.Text = “”

txtnm.Text = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdlagi_Click()

txtnk.SetFocus

txtgol.Text = “”

txtks.Text = “”

txtst.Text = “”

txtth.Text = “”

txtjb.Text = “”

txtbg.Text = “”

txtgp.Text = “”

txttj.Text = “”

txttg.Text = “”

txtnk.Text = “”

txtnm.Text = “”

End Sub

Private Sub cmdproses_Click()

Dim s As String

s = Mid(txtnk.Text, 5, 1)

If s = “A” Then

txtgol.Text = “A”

txtjb.Text = “MANAGER”

txtgp.Text = “3000000”

txttj.Text = “875000”

ElseIf s = “B” Then

txtgol.Text = “B”

txtjb.Text = “KA SEKSI”

txtgp.Text = “2500000”

txttj.Text = “525000”

ElseIf s = “C” Then

txtgol.Text = “C”

txtjb.Text = “STAFF”

txtgp.Text = “2000000”

txttj.Text = “325000”

End If

txtth = Left(txtnk.Text, 4)

txttg = Val(txtgp.Text) + Val(txttj.Text)

s = Right(txtnk.Text, 3)

If s = “KEU” Then

txtbg.Text = “ACCOUNTING”

ElseIf s = “ADM” Then

txtbg.Text = “ADMINISTRASI”

ElseIf s = “SDM” Then

txtbg.Text = “GENERAL AFFAIR”

ElseIf s = “EDP” Then

txtbg.Text = “IT UNIT”

ElseIf s = “SPM” Then

txtbg.Text = “SECURITY”

End If

s = Mid(txtnk.Text, 7, 1)

If s = “S” Then

txtks.Text = “S”

txtst.Text = “SINGLE”

ElseIf s = “M” Then

txtks.Text = “M”

txtst.Text = “MENIKAH”

ElseIf s = “D” Then

txtks.Text = “D”

txtst.Text = “DUDA”

ElseIf s = “J” Then

txtks.Text = “J”

txtst.Text = “JANDA”

End If

End Sub

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

Private Sub Command4_Click()

Data1.Recordset.Edit

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

%d bloggers like this: