TUGAS VB DATABASE

Image

 

Private Sub CmdProses_Click()
Dim KO As String
Dim tu, tg, gp As Currency
KO = Mid(Text11.Text, 2, 4)
Text4.Text = KO
KO = Left(Text11.Text, 1)
If KO = “A” Then
Text1.Text = KO
Text5.Text = “MANAJER”
Text7.Text = “2500000″
Text8.Text = ” 625000″
ElseIf KO = “B” Then
Text1.Text = KO
Text5.Text = “KA. SEKSI”
Text7.Text = “1600000″
Text8.Text = “375000″
ElseIf KO = “C” Then
Text1.Text = KO
Text5.Text = “STAFF”
Text7.Text = “1000000″
Text8.Text = “250000″
End If
tu = Val(Text8.Text)
gp = Val(Text7.Text)
tg = tu + gp
Text9.Text = tg
KO = Right(Text11.Text, 1)
If KO = “M” Then
Text2.Text = “M”
Text3.Text = “MENIKAH”
ElseIf KO = “S” Then
Text2.Text = “S”
Text3.Text = “SINGLE”
ElseIf KO = “D” Then
Text2.Text = “D”
Text3.Text = “DUDA”
ElseIf KO = “J” Then
Text2.Text = “J”
Text3.Text = “JANDA”
End If
KO = Mid(Text11, 6, 3)
If KO = “KEU” Then
Text6.Text = “accounting”
ElseIf KO = “ADM” Then
Text6.Text = “Administration”
ElseIf KO = “SDM” Then
Text6.Text = “Generalaffair”
ElseIf KO = ” EDP” Then
Text6.Text = ” IT Unit”
ElseIf KO = ” SPM” Then
Text6.Text = “Security”
End If
End Sub

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

Private Sub CmdBatal_Click()
Text10.Text = “”
Text11.Text = “”
Text10.SetFocus
End Sub

Private Sub cmdKeluar_Click()
Unload Me
End Sub

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

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

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

Iklan

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