pratikum uts vb database


Private Sub Command1_Click()
Dim s As String
Text4.Text = Left(Text11.Text, 4)
s = Mid(Text11.Text, 5, 1)
If s = “A” Then
Text1.Text = “A”
Text5.Text = “MANAGER”
Text7.Text = “2500000”
Text8.Text = “625000”
ElseIf s = “B” Then
Text1.Text = “B”
Text5.Text = “KA SEKSI”
Text7.Text = “1500000”
Text8.Text = “375000”
ElseIf s = “C” Then
Text1.Text = “C”
Text5.Text = “STAFF”
Text7.Text = “1000000”
Text8.Text = “250000”
End If
Text9.Text = Val(Text8.Text) + Val(Text7.Text)

s = Right(Text11, 3)
If s = “KEU” Then
Text6.Text = “ACCOUNTING”
ElseIf s = “ADM” Then
Text6.Text = “ADMINISTRATION”
ElseIf s = “SDM” Then
Text6.Text = “GENERAL AFFAIR”
ElseIf s = “EDP” Then
Text6.Text = “IT UNIT”
ElseIf s = “SPM” Then
Text6.Text = “SECURITY”
End If
s = Mid(Text11, 7, 1)
If s = “M” Then
Text2.Text = “M”
Text3.Text = “MENIKAH”
ElseIf s = “S” Then
Text2.Text = “S”
Text3.Text = “SINGGEL”
ElseIf s = “J” Then
Text2.Text = “J”
Text3.Text = “JANDA”
ElseIf s = “D” Then
Text2.Text = “D”
Text3.Text = “DUDA”
End If
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 = “”
Text12.Text = “”
Text10.SetFocus
End Sub

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

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Command5_Click()
Data1.Recordset.AddNew
Text10.SetFocus
End Sub

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

Private Sub Command7_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