tipe i database

I

Private Sub Cmdprosess_Click()
Dim a, b, c As String
a = Mid(txtnik, 5, 1)
If a = “A” Then
golongan = “A”
jabatan = “MANAJER”
gaji = “4000000”
tunjangan = “1025000”
ElseIf a = “B” Then
golongan = “B”
jabatan = “Ka.Seksi”
gaji = “3500000”
tunjangan = “975000”
ElseIf a = “C” Then
golongan = “C”
jabatan = “staff”
gaji = “3000000”
tunjangan = “925000”
End If
b = Mid(txtnik, 7, 1)
If b = “S” Then
kode = “S”
Status = “Single”
ElseIf b = “M” Then
kode = “M”
Status = “Menikah”
ElseIf b = “J” Then
kode = “J”
Status = “Janda”
ElseIf b = “D” Then
kode = “D”
Status = “Duda”
End If
c = Right(txtnik, 3)
If c = “KEU” Then
bagian = “ACCOUNTING”
ElseIf c = “ADM” Then
bagian = “ADMINISTRASI”
ElseIf c = “SDM” Then
bagian = “GENERAL AFFAIR”
ElseIf c = “EDP” Then
bagian = “IT UNIT”
ElseIf c = “SPM” Then
bagian = “SECURITY”
End If
txttahun = Left(txtnik, 4)
txtgolongan = golongan
txtjabatan = jabatan
txtstatus = Status
txtbagian = bagian
txttunjangan = tunjangan
txtgaji = gaji
txtkode = kode
txttotal = Val(txtgaji) + Val(txttunjangan)
End Sub

Private Sub Cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnik = “”
txtgolongan = “”
txtkode = “”
txtstatus = “”
txttahun = “”
txtjabatan = “”
txtbagian = “”
txtgaji = “”
txttunjangan = “”
txttotal = “”

End Sub

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnik = “”
txtgolongan = “”
txtkode = “”
txtstatus = “”
txttahun = “”
txtjabatan = “”
txtbagian = “”
txtgaji = “”
txttunjangan = “”
txttotal = “”
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
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 )

Foto Google+

You are commenting using your Google+ 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 )

Connecting to %s