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

tipe h databse

H
Private Sub cbxkk_Click()
Select Case cbxkk.Text
Case “P205”
jenis = “Pentium II 500 Mega Hz”
harga = “1500000”
Case “P308”
jenis = “Pentium III 800 Mega Hz”
harga = “2100000”
Case “P310”
jenis = “Pentium III 1.0 Giga Hz ”
harga = “3500000”
Case “P415”
jenis = “Pentium IV 1.5 Giga Hz”
harga = “4000000”
Case “P417”
jenis = “Pentium IV 1.7 Giga Hz ”
harga = “4200000”
Case “P419”
jenis = “Pentium IV 1.9 Giga Hz”
harga = “5500000”

End Select
txtjj.SetFocus
txtjenis = jenis
txtharga = harga
End Sub

Private Sub cmdclose_Click()
Unload Me
End Sub

Private Sub cmdhitung_Click()
cbxkk = “Pilih Kode”
txtmerk = “”
txtharga = “”
txtjj = “”
txthp = “”
txtdis = “”
txttb = “”
txtjenis = “”
End Sub

Private Sub cmdprosess_Click()
txthp = Val(txtharga) * Val(txtjj)
If txthp > 40000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 35000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 30000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 25000000 Then
txtdis = Val(txthp) * 0.02
End If
txttb = Val(txthp) – Val(txtdis)
End Sub

Private Sub Form_Load()
cbxkk.AddItem “P205”
cbxkk.AddItem “P308”
cbxkk.AddItem “P310”
cbxkk.AddItem “P415”
cbxkk.AddItem “P417”
cbxkk.AddItem “P419”

End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
cbxkk.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

tipe G database

G

Private Sub cmdbatal_Click()
Txtnama = “”
txtnpm = “”
txtjurusan = “”
txtstudi = “”
txtmasuk = “”
txtnurut = “”
txtbp = “”
Txtnama.SetFocus
End Sub

Private Sub cmdlagi_Click()
Txtnama = “”
txtnpm = “”
txtjurusan = “”
txtstudi = “”
txtmasuk = “”
txtnurut = “”
txtbp = “”
Txtnama.SetFocus

End Sub

Private Sub cmdproses_Click()
Dim a, b, c As String
a = Mid(txtnpm, 3, 1)
If a = “1” Then
jurusan = “Sistem Informasi”
ElseIf a = “2” Then
jurusan = “tekhnik informatika”
ElseIf a = “3” Then
jurusan = “Manajemen Informatika”
ElseIf a = “4” Then
jurusan = “Manajemen & Komp. Akuntansi”
End If
b = Mid(txtnpm, 4, 2)
If b = “01” Then
studi = “Strata Satu ”
bp = “1950000”
ElseIf b = “02” Then
studi = “Diploma Empat ”
bp = “1750000”
ElseIf b = “03” Then
studi = “Diploma Tiga ”
bp = “1650000”
ElseIf b = “04” Then
studi = “Diploma Dua ”
bp = “1450000”
End If
nurut = Right(txtnpm, 3)
masuk = “20” & Left(txtnpm, 2)

txtnurut = nurut
txtstudi = studi
txtjurusan = jurusan
txtbp = bp
txtmasuk = masuk

End Sub
Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.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