TUGAS UTS PRAKTEK VB

 

Private Sub Command1_Click()
Dim A As String
Text6.Text = Left(Text2.Text, 4)
A = Mid(Text2.Text, 5, 1)
If A = “A” Then
Text3.Text = “A”
Text7.Text = “MANAGER”
Text9.Text = “3000000”
Text10.Text = “875000”
ElseIf A = “B” Then
Text3.Text = “B”
Text7.Text = “KA SEKSI”
Text9.Text = “2500000”
Text10.Text = “525000”
ElseIf A = “C” Then
Text3.Text = “C”
Text7.Text = “STAFF”
Text9.Text = “2000000”
Text10.Text = “325000”
End If
A = Mid(Text2.Text, 7, 1)
If A = “S” Then
Text4.Text = “S”
Text5.Text = “SINGLE”
ElseIf A = “M” Then
Text4.Text = “M”
Text5.Text = “MENIKAH”
ElseIf A = “D” Then
Text4.Text = “D”
Text5.Text = “DUDA”
ElseIf A = “J” Then
Text4.Text = “J”
Text5.Text = “JANDA”
End If
A = Right(Text2.Text, 3)
If A = “KEU” Then
Text8.Text = “ACCOUNTING”
ElseIf A = “ADM” Then
Text8.Text = “ADMINISTRASI”
ElseIf A = “SDM” Then
Text8.Text = “GENERAL AFFAIR”
ElseIf A = “EDP” Then
Text8.Text = “IT UNIT”
ElseIf A = “SPM” Then
Text8.Text = “SECURITY”
End If
Text11.Text = Val(Text9.Text) + Val(Text10.Text)
End Sub

Private Sub Command2_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
Text8.Text = “”
Text9.Text = “”
Text10.Text = “”
Text11.Text = “”
Text1.SetFocus
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Command5_Click()
Data1.Recordset.Update
End Sub

Private Sub Command6_Click()
Data1.Recordset.Delete
Data1.Refresh
End Sub

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s