Tugas VB Data Base 13

TUGAS13 INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
txtkode.SetFocus
txtkode = “”
txtnb = “”
txthb = “”
txtjb = “”
txtby = “”
txtpot = “”
txttb = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdhitung_Click()
txtby = Val(txthb) * Val(txtjb)
If txtjb > 5 Then
txtpot = Val(txtby) * 0.02
End If
txttotal = Val(txtby) – Val(txtpot)
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Mid(txtkode.Text, 5, 2)
If A = “SP” Then
nb = “SPIDOL”
hb = “9500”
ElseIf A = “BT” Then
nb = “BUKU TULIS”
hb = “12500”
ElseIf A = “TP” Then
nb = “TIP EX”
hb = “3000”
ElseIf A = “PG” Then
nb = “PENGGARIS”
hb = “25000”
ElseIf A = “PT” Then
nb = “PAPAN TULIS”
hb = “50000”
End If
txtnb.Text = nb
txthb.Text = hb
End Sub

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

Iklan

Tugas VB Data Base I

TUGASI INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

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

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

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

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub

Tugas VB Data Base H

TUGASH INDAH.png

Private Sub cbokode_Click()
Select Case cbokode.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
txtjk = jenis
txtharga = harga
End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
cbokode = “Pilih Kode”
txtjk = “”
txtharga = “”
txtjj = “”
txthp = “”
txtdis = “”
txttotal = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_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
txttotal = Val(txthp) – Val(txtdis)
End Sub

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

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

Tugas VB Data Base G

TUGASG INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtprodi = “”
txttm = “”
txturut = “”
txtbp = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdkeluar_Click()
X = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If X = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim S As String
txttm.Text = “20” & Left(txtnpm.Text, 2)
S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
txtjur.Text = “Teknik Informasi”
ElseIf S = “3” Then
txtjur.Text = “Manajemen Informatika”
ElseIf S = “4” Then
txtjur.Text = “Komputer Dan Akuntansi”
End If
S = Mid(txtnpm.Text, 5, 2)
If S = “01” Then
txtprodi.Text = “Strata Satu”
txtbp = “1950000”
ElseIf S = “02” Then
txtprodi.Text = “Diploma Empat”
txtbp = “1750000”
ElseIf S = “03” Then
txtprodi.Text = “Diploma Tiga”
txtbp = “1650000”
ElseIf S = “04” Then
txtprodi.Text = “Diploma Dua”
txtbp = “1450000”
End If
txturut.Text = Right(txtnpm.Text, 3)
End Sub

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

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub

Tugas VB Data Base F

TUGASF INDAH

Private Sub cbxkl_Click()
Select Case cbxkl.Text
Case “Asus A43SA”
txtmerk = “Asus A43SA-VX090D”
txtharga = “5500000”
Case “Asus A43SD”
txtmerk = “Asus A43SD-VX052D”
txtharga = “4500000”
Case “Asus A43SJ”
txtmerk = “Asus A43SJ-VX792D”
txtharga = “4300000”
Case “Asus A43TA”
txtmerk = “Asus A43TA-VX034D”
txtharga = “4900000”
Case “Asus N43SL”
txtmerk = “Asus N43SL-VX264D”
txtharga = “4300000”
Case “Apple MD311”
txtmerk = “Apple MacBook Pro MD311”
txtharga = “19300000”
Case “Apple MD313”
txtmerk = “Apple MacBook Pro MD313”
txtharga = “24200000”
Case “Apple MD314”
txtmerk = “Apple MacBook Pro MD314”
txtharga = “11900000”
Case “Apple MD322”
txtmerk = “Apple MacBook Pro MD322”
txtharga = “14700000”
Case “Apple MC965”
txtmerk = “Apple MacBook Air MC965”
txtharga = “21300000”
End Select
txtjj.SetFocus
End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
cbxkl = “Pilih Kode”
txtmerk = “”
txtharga = “”
txtjj = “”
txthp = “”
txtdis = “”
txttb = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdclose_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
txthp = Val(txtharga) * Val(txtjj)
If txthp > 140000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 135000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 130000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 125000000 Then
txtdis = Val(txthp) * 0.02
End If
txttb = Val(txthp) – Val(txtdis)
End Sub

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

Private Sub Form_Load()
cbxkl.AddItem “Asus A43SA”
cbxkl.AddItem “Asus A43SD”
cbxkl.AddItem “Asus A43SJ”
cbxkl.AddItem “Asus A43TA”
cbxkl.AddItem “Asus N43SL”
cbxkl.AddItem “Apple MD311”
cbxkl.AddItem “Apple MD313”
cbxkl.AddItem “Apple MD314”
cbxkl.AddItem “Apple MD322”
cbxkl.AddItem “Apple MC965”
End Sub

Tugas VB Data Base E

TUGASE INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
cbokb.SetFocus
cbokb = “”
txtjb = “”
txtp = “”
txttahun = “”
txtpenerbit = “”
txtharga = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim A, B, C As String
A = Right(cbokb, 1)
If A = “A” Then
penerbit = “Andi Offset Yogyakarta”
ElseIf A = “I” Then
penerbit = “Indah Surabaya”
ElseIf A = “S” Then
penerbit = “Salemba Empat”
ElseIf A = “E” Then
penerbit = “Elek Media Komputindo”
ElseIf A = “M” Then
penerbit = “Maxicom”
End If
B = Left(cbokb, 3)
If B = “SIM” Then
jb = “Sistem Informasi Manajemen”
p = “Andra Setiawan”
harga = “75900”
ElseIf B = “EDP” Then
jb = “Elektronik Data Processing”
p = “Desi Istiqomah”
harga = “62000”
ElseIf B = “MNJ” Then
jb = “Manajemen”
p = “Sandy Fitrajaya”
harga = “42000”
ElseIf B = “CDR” Then
jb = “Corel Draw”
p = “Tri Indah Sari”
harga = “53000”
ElseIf B = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
p = “Winda Erlianti”
harga = “83000”
End If
tahun = “20” & Right(cbokb5, 2)

cbotkb = kb
txtjb = jb
txtp = p
txttahun = tahun
txtpenerbit = penerbit
txtharga = harga
End Sub

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

Private Sub Form_Load()
cbokb.AddItem “SIM-9-A”
cbokb.AddItem “EDP-10-I”
cbokb.AddItem “MNJ-11-S”
cbokb.AddItem “CDR-12-E”
cbokb.AddItem “RPL-13-M”
End Sub

Tugas VB Data Base D

TUGASD INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
cbokb.SetFocus
cbokb = “”
txtjb = “”
txtp = “”
txttahun = “”
txtpenerbit = “”
txtharga = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim A, B, C As String
A = Right(cbokb, 1)
If A = “A” Then
penerbit = “Andi Offset Yogyakarta”
ElseIf A = “I” Then
penerbit = “Indah Surabaya”
ElseIf A = “S” Then
penerbit = “Salemba Empat”
ElseIf A = “E” Then
penerbit = “Elek Media Komputindo”
ElseIf A = “M” Then
penerbit = “Maxicom”
End If
B = Left(cbokb, 3)
If B = “SIM” Then
jb = “Sistem Informasi Manajemen”
p = “Andra Setiawan”
harga = “75900”
ElseIf B = “EDP” Then
jb = “Elektronik Data Processing”
p = “Desi Istiqomah”
harga = “62000”
ElseIf B = “MNJ” Then
jb = “Manajemen”
p = “Sandy Fitrajaya”
harga = “42000”
ElseIf B = “CDR” Then
jb = “Corel Draw”
p = “Tri Indah Sari”
harga = “53000”
ElseIf B = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
p = “Winda Erlianti”
harga = “83000”
End If
tahun = “20” & Right(cbokb5, 2)

cbotkb = kb
txtjb = jb
txtp = p
txttahun = tahun
txtpenerbit = penerbit
txtharga = harga
End Sub

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

Private Sub Form_Load()
cbokb.AddItem “SIM-9-A”
cbokb.AddItem “EDP-10-I”
cbokb.AddItem “MNJ-11-S”
cbokb.AddItem “CDR-12-E”
cbokb.AddItem “RPL-13-M”
End Sub

Tugas VB Data Base C

TUGASC INDAH

Private Sub cbokode_Click()
Select Case cbokode.Text
Case “P205”
jk = “Pentium II 500 Mega Hz”
hs = “1500000”
Case “P308”
jk = “Pentium III 800 Mega Hz ”
hs = “2100000 ”
Case “P310”
jk = “Pentium III 1.0 Giga Hz ”
hs = “3500000 ”
Case “P415”
jk = “Pentium IV 1.5 Giga Hz”
hs = “4000000 ”
Case “P417”
jk = “Pentium IV 1.7 Giga Hz ”
hs = “4200000 ”
Case “P419”
jk = “Pentium IV 1.9 Giga Hz”
hs = ” 5500000 ”
End Select
txtjk = jk
txths = hs
txtjs.SetFocus
End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If

End Sub

Private Sub cmdcancel_Click()
cbokode = “Pilih kode”
txtjk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txthb = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdproses_Click()
txthp = Val(txths) * Val(txtjs)
If txthp > 30000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 25000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 20000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 15000000 Then
txtdis = Val(txthp) * 0.02
End If
txthb = Val(txthp) – Val(txtdis)
End Sub

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

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

Tugas VB Data Base B

TUGASB INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
txtkb.SetFocus
txtjb = “”
txtp = “”
txttahun = “”
txtpenerbit = “”
txthg = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim A, B, C As String
A = Left(txtkb, 1)
If A = “A” Then
penerbit = “Andi Offset Yogyakarta”
ElseIf A = “I” Then
penerbit = “Indah Surabaya”
ElseIf A = “S” Then
penerbit = “Salemba Empat”
ElseIf A = “E” Then
penerbit = “Elek Media Komputindo”
ElseIf A = “M” Then
penerbit = “Maxicom”
End If
B = Mid(txtkb, 3, 3)
If B = “SIM” Then
jb = “Sistem Informasi Manajemen”
p = “Andra Setiawan”
harga = “75900”
ElseIf B = “EDP” Then
jb = “Elektronik Data Processing”
p = “Desi Istiqomah”
harga = “62000”
ElseIf B = “MNJ” Then
jb = “Manajemen”
p = “Sandy Fitrajaya”
harga = “42000”
ElseIf B = “CDR” Then
jb = “Corel Draw”
p = “Tri Indah Sari”
harga = “53000”
ElseIf B = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
p = “Winda Erlianti”
harga = “53000”
End If
tahun = “20” & Right(txtkb, 2)

txtkb = kb
txtjb = jb
txtp = p
txttahun = tahun
txtpenerbit = penerbit
txthg = harga
End Sub

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

Tugas VB Data Base A

TUGASA INDAH

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdcancel_Click()
txtkt.SetFocus
txtkt = “”
txtht = “”
txtjk = “”
txtjb = “”
txtjt = “”
txtjp = “”
txttotalp = “”
Data1.RecordSet.Delete
End Sub

Private Sub cmdclose_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “Infromasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub Cmdproses_Click()
Dim B, E, M, S As String
B = Left(txtkt, 3)
If B = “BIM” Then
jk = “BIMA”
ht = “50000”
jb = “16.00”
ElseIf B = “EKO” Then
jk = “EKONOMI”
ht = “35000”
jb = “19.00”
ElseIf B = “MUT” Then
jk = “MUTIARA”
ht = “23000”
jb = “17.00”
ElseIf B = “SEN” Then
jk = “SENJA”
ht = “15000”
jb = “20.00”
End If
txtjk = jk
txtjb = jb
txtjt = jt
txttotalp = tp
txtht = ht
txtjt.SetFocus
End Sub

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

Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * Val(txtjt)
End If
End Sub