TUGAS 1 SEMESTER 3

FEBRI

Private Sub CMDBARU_Click()

Data1.Recordset.AddNew

End Sub

Private Sub CMDHAPUS_Click()

Data1.Recordset.Delete

End Sub

Private Sub CMDKELUAR_Click(Index As Integer)

End

End Sub

Private Sub CMDPROSES_Click()

If TXTHP = “nokia” Then

TXTHAR.Text = “800.000”

TXTRAM.Text = “1 gb”

TXTMEMO.Text = “16”

TXTKA.Text = “5 mp”

ElseIf TXTHP = “samsung” Then

TXTHAR.Text = “1000.000”

TXTRAM.Text = “1 gb”

TXTMEMO.Text = “64”

TXTKA.Text = “13 mp”

ElseIf TXTHP = “Iphone” Then

TXTHAR.Text = “8000.000”

TXTRAM.Text = “3 gb”

TXTMEMO.Text = “124”

TXTKA.Text = “20 mp”

Data1.Recordset.Update

End If

End Sub

Private Sub CMDSIMPAN_Click()

Data1.Recordset.Update

End Sub

Iklan

TUGAS 13 PROGRAM DATABASE

PROGRAM 1

TUGAS A

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtkt = “”
txtkt.SetFocus
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtkt.SetFocus
txtkt = “”
txtht = “”
txtjk = “”
txtjb = “”
txtjt = “”
txttotalp = “”
End Sub

Private Sub cmdproses_Click()
Dim KT, HT, JK, JB As String
KT = Left(txtkt, 3)
If KT = “BIM” Then
HT = “50.000”
JK = “BIMA”
JB = “Pukul 16:00”
ElseIf KT = “EKO” Then
HT = “35.000”
JK = “EKONOMI”
JB = “Pukul 19:00”
ElseIf KT = “MUT” Then
HT = “23.000”
JK = “MUTIARA”
JB = “Pukul 20:00”
ElseIf KT = “SEN” Then
HT = “15.000”
JK = “SENJA”
JB = “Pukul 20:00”
End If

KT = (txtkt)
txtjt.SetFocus
txtkt = KT
txtht = HT
txtjk = JK
txtjb = JB

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

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

Private Sub txtkt_Keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim KT As String
Dim HT As String
Dim JK As String
Dim JB As String
KT = Left(txtkt, 3)
If KT = “BIM” Then
HT = “50.000”
JK = “BIMA”
JB = “Pukul 16:00”
ElseIf KT = “EKO” Then
HT = “35.000”
JK = “EKONOMI”
JB = “Pukul 19:00”
ElseIf KT = “MUT” Then
HT = “23.000”
JK = “MUTIARA”
JB = “Pukul 20:00”
ElseIf KT = “SEN” Then
HT = “15.000”
JK = “SENJA”
JB = “Pukul 20:00”

End If
txtjt.SetFocus
KT = (txtkt.Text)
txtkt = KT
txtht = HT
txtjk = JK
txtjb = JB

End If
End Sub

 

PROGRAM 2

TUGAS B

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtkb = “”
txtkb.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb = “”
txtjb = “”
txtp = “”
txttahun = “”
txtpenerbit = “”
txthg = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtkb.SetFocus
txtkb = “”
txtjb = “”
txtp = “”
txttahun = “”
txtpenerbit = “”
txthg = “”

End Sub

Private Sub cmdproses_Click()
Dim KB, JB, PG, TT, PN, HG As String
KB = Mid(txtkb, 3, 3)
If KB = “SIM” Then
JB = “Sistem Informasi Manajemen”
PG = “Andra Setiawan”
HG = “Rp.75.900,-”
ElseIf KB = “EDP” Then
JB = “Elektronik Data Processing”
PG = “Desi Istiqomah”
HG = “Rp.62.000,-”
ElseIf KB = “MNJ” Then
JB = “Manajemen”
PG = “Sandy Fitrajaya”
HG = “Rp.42.000′-”
ElseIf KB = “CDR” Then
JB = “Corel Draw”
PG = “Tri Indah Sari”
HG = “Rp.53.000,-”
ElseIf KB = “RPL” Then
JB = “Rekayasa Perangkat Lunak”
PG = “Ernita”
HG = “Rp.83.000,-”
End If

KB = Left(txtkb, 1)
If KB = “A” Then
PN = “Andy Offset Yogyakarta”
ElseIf KB = “I” Then
PN = “Indah Surabaya”
ElseIf KB = “S” Then
PN = “Salemba Empat”
ElseIf KB = “E” Then
PN = “Elek Media Komputindo”
ElseIf KB = “M” Then
PN = “Maxicom”
End If

TT = “20” + Right(txtkb, 2)
KB = (txtkb.Text)
txtkb = KB
txtjb = JB
txtp = PG
txttahun = TT
txtpenerbit = PN
txthg = HG

End Sub

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

 

PROGRAM 3

TUGAS C

Private Sub cbokk_click()
Dim JK, HS As String
Select Case cbokk
Case “P205”
JK = “Pentium II 500 Mega Hz”
HS = “1500000”
Case “P308”
JK = “Pentium II 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
txtjj.SetFocus
txtjk = JK
txths = HS

End Sub

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
cbokode = “(pilih kode)”
txthp = “”
txthb = “”
txtdis = “”
txtprs = “”
End Sub

Private Sub cmdclose_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdlagi_Click()
cbokk = “(pilih kode)”
txtjk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txtprs = “”
txthb = “”

End Sub

Private Sub cmdproses_Click()
Dim JJ, HP, DIS, HB, PRS As String
HP = (txths.Text * txtjj.Text)
If HP > 30000000 Then
DIS = HP * 0.15
HB = HP – DIS
PRS = “15%”
ElseIf HP > 25000000 Then
DIS = HP * 0.1
HB = HP – DIS
PRS = “10%”
ElseIf HP > 20000000 Then
DIS = HP * 0.05
HB = HP – DIS
PRS = “5%”
ElseIf HP > 15000000 Then
DIS = HP * 0.02
HB = HP – DIS
PRS = “2%”
ElseIf HP > 0 Then
DIS = “0”
HB = HP – DIS
PRS = “0%”
End If
txtjj.SetFocus
JJ = (txtjj.Text)
txtjj = JJ
txthp = HP
txtdis = DIS
txthb = HB
txtprs = PRS
End Sub
Private Sub Command3_Click()
Data1.Recordset.Delete
End Sub

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

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

End Sub

Private Sub txtjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim JJ, HP, DIS, HB, PRS As String
HP = (txths.Text * txtjj.Text)
If HP > 30000000 Then
DIS = HP * 0.15
HB = HP – DIS
PRS = “15%”
ElseIf HP > 25000000 Then
DIS = HP * 0.1
HB = HP – DIS
PRS = “10%”
ElseIf HP > 20000000 Then
DIS = HP * 0.05
HB = HP – DIS
PRS = “5%”
ElseIf HP > 15000000 Then
DIS = HP * 0.02
HB = HP – DIS
PRS = “2%”
ElseIf HP > 0 Then
DIS = “0”
HB = HP – DIS
PRS = “0%”
End If
JJ = (txtjj)
txtjj = JJ
txthp = HP
txtdis = DIS
txthb = HB
txtprs = PRS
End If
End Sub

 

PROGRAM 4

TUGAS D

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

Private Sub cmdbatal_Click()
cbokb = “(pilih kode)”
txtjb = “”
txtp = “”
txttahun = “”
txtpen = “”
txthg = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
cbokb = “(pilih kode)”
txtjb = “”
txtp = “”
txttahun = “”
txtpen = “”
txthg = “”
End Sub

Private Sub cmdproses_Click()
Dim KB, JB, PG, TT, PN, HG As String
KB = (cbokb.Text)
KB = Left(cbokb, 1)
If KB = “A” Then
PN = “Andi Offset Yogyakarta”
ElseIf KB = “I” Then
PN = “Indah Surabaya”
ElseIf KB = “S” Then
PN = “Salemba Empat”
ElseIf KB = “E” Then
PN = “Elek Media Komputindo”
ElseIf KB = “M” Then
PN = “Maxicom”
End If

KB = Mid(cbokb, 3, 3)
If KB = “SIM” Then
JB = “Sistem Informasi Manajemen”
PG = “Yati Nur Oktavia”
HG = “Rp.75.900,-”
ElseIf KB = “EDP” Then
JB = “Electronic Data Processing”
PG = “Imam Tarmizi”
HG = “Rp.62.000,-”
ElseIf KB = “MNJ” Then
JB = “Manajemen”
PG = “Valentina Mariana Adiwianti”
HG = “Rp.42.000,-”
ElseIf KB = “CDR” Then
JB = “Corel Draw”
PG = “Riyan Suhandi”
HG = “Rp.53.000,-”
ElseIf KB = “RPL” Then
JB = “Rekayasa Perangkat Lunak”
PG = “Sinta Umpu Singa”
HG = “Rp.83.000,-”
End If

TT = “20” + Right(cbokb, 2)
KB = (cbokb)
cbokb = KB
txtjb = JB
txtp = PG
txttahun = TT
txtpen = PN
txthg = HG

End Sub

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

Private Sub Form_Load()
cbokb.AddItem “A-SIM-01”
cbokb.AddItem “I-EDP-02”
cbokb.AddItem “S-MNJ-03”
cbokb.AddItem “E-CDR-04”
cbokb.AddItem “M-RPL-05”

End Sub

 

PROGRAM 5

TUGAS E

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtkb.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb = “”
txtjb = “”
txtpeng = “”
txttahun = “”
txtpen = “”
txthg = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtkb.SetFocus
txtkb = “”
txtjb = “”
txtpeng = “”
txttahun = “”
txtpen = “”
txthg = “”
End Sub

Private Sub cmdproses_Click()
Dim KB, JB, PG, TT, PN, HG As String
KB = Left(txtkb, 3)
If KB = “SIM” Then
JB = “Sistem Informasi Manajemen”
PG = “Fadiya Ulfa”
HG = “Rp.75.900,-”
ElseIf KB = “EDP” Then
JB = “Electronic Data Processing”
PG = “Nurul Agustina”
HG = “Rp.62.000,-”
ElseIf KB = “MNJ” Then
JB = “Manajemen”
PG = “Rian Hidayat”
HG = “Rp.42.000,-”
ElseIf KB = “CDR” Then
JB = “Corel Draw”
PG = “Siti Nur Khotimah”
HG = “Rp.53.000,-”
ElseIf KB = “RPL” Then
JB = “Rekayasa Perangkat Lunak”
PG = “Winda Erlianti”
HG = “Rp.83.000,-”

End If

KB = Right(txtkb, 1)
If KB = “A” Then
PN = “Andi Offset Yogyakarta”
ElseIf KB = “I” Then
PN = “Indah Surabaya”
ElseIf KB = “S” Then
PN = “Salemba Empat”
ElseIf KB = “E” Then
PN = “Elek Media Komputindo”
ElseIf KB = “M” Then
PN = “Maxicom”
End If

TT = “20” + Mid(txtkb, 5, 2)
KB = (txtkb.Text)
txtkb = KB
txtjb = JB
txtpeng = PG
txttahun = TT
txtpen = PN
txthg = HG

End Sub

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

 

 

PROGRAM 6

TUGAS F

Private Sub cbokode_Click()
Dim MT, HS, JJ, HP, DIS, TP As String
cbokode = Right(cbokode, 5)

Select Case cbokode
Case “A43SA”
MT = “Asus A43SA-VX090D”
HS = “5.500.000”
Case “A43SD”
MT = “Asus A43SD-VX052D”
HS = “4.500.000”
Case “A43SJ”
MT = “Asus A43SJ-VX792D”
HS = “4.300.000”
Case “A43TA”
MT = “Asus A43TA-VX034D”
HS = “4.900.000”
Case “N43SL”
MT = “Asus N43SL-VX264D”
HS = “4.300.000”
Case “MD311”
MT = “Apple MacBook Pro MD311”
HS = “19.300.000”
Case “MD313”
MT = “Apple MacBook Pro MD313”
HS = “24.200.000”
Case “MD314”
MT = “Apple MacBook Pro MD314”
HS = “11.900.000”
Case “MD322”
MT = “Apple MacBook Pro MD322”
HS = “14.700.000”
Case “MC965”
MT = “Apple MacBook Air MC965”
HS = “21.300.000”
End Select
cbokode.Text = (cbokode.Text)
txtjj.SetFocus
txtmerk = MT
txths = HS
txtjj = JJ
txthp = HP
txtdis = DIS
txttp = TP

End Sub

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtdis = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
cbokode = “(pilih kode)”
txtmerk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txttp = “”

End Sub

Private Sub cmdproses_Click()
txthp = txths * txtjj
If txthp > 140000000 Then
txtdis = txthp * 0.15
txttp = txthp – txtdis
txtprs = “15%”
ElseIf txthp > 135000000 Then
txtdis = txthp * 0.1
txttp = txthp – txtdis
txtprs = “10%”
ElseIf txthp > 130000000 Then
txtdis = txthp * 0.05
txttp = txthp – txtdis
txtprs = “5%”
ElseIf txthp > 125000000 Then
txtdis = txthp * 0.02
txttp = txthp – txtdis
txtprs = “2%”
ElseIf txthp > 0 Then
txtdis = txthp * 0
txttp = txthp – txtdis
txtprs = “0%”
End If
End Sub

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

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

End Sub

 

PROGRAM 7

TUGAS G

Private Sub cbokode_Click()
Dim MT, HS, JJ, HP, DIS, TP As String
cbokode = Right(cbokode, 5)

Select Case cbokode
Case “A43SA”
MT = “Asus A43SA-VX090D”
HS = “5.500.000”
Case “A43SD”
MT = “Asus A43SD-VX052D”
HS = “4.500.000”
Case “A43SJ”
MT = “Asus A43SJ-VX792D”
HS = “4.300.000”
Case “A43TA”
MT = “Asus A43TA-VX034D”
HS = “4.900.000”
Case “N43SL”
MT = “Asus N43SL-VX264D”
HS = “4.300.000”
Case “MD311”
MT = “Apple MacBook Pro MD311”
HS = “19.300.000”
Case “MD313”
MT = “Apple MacBook Pro MD313”
HS = “24.200.000”
Case “MD314”
MT = “Apple MacBook Pro MD314”
HS = “11.900.000”
Case “MD322”
MT = “Apple MacBook Pro MD322”
HS = “14.700.000”
Case “MC965”
MT = “Apple MacBook Air MC965”
HS = “21.300.000”
End Select
cbokode.Text = (cbokode.Text)
txtjj.SetFocus
txtmerk = MT
txths = HS
txtjj = JJ
txthp = HP
txtdis = DIS
txttp = TP

End Sub

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtdis = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
cbokode = “(pilih kode)”
txtmerk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txttp = “”

End Sub

Private Sub cmdproses_Click()
txthp = txths * txtjj
If txthp > 140000000 Then
txtdis = txthp * 0.15
txttp = txthp – txtdis
txtprs = “15%”
ElseIf txthp > 135000000 Then
txtdis = txthp * 0.1
txttp = txthp – txtdis
txtprs = “10%”
ElseIf txthp > 130000000 Then
txtdis = txthp * 0.05
txttp = txthp – txtdis
txtprs = “5%”
ElseIf txthp > 125000000 Then
txtdis = txthp * 0.02
txttp = txthp – txtdis
txtprs = “2%”
ElseIf txthp > 0 Then
txtdis = txthp * 0
txttp = txthp – txtdis
txtprs = “0%”
End If
End Sub

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

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

End Sub

 

 

PROGRAM 8

TUGAS H

Private Sub cbokode_Click()
KL = Right(cbokode, 5)
Dim JK, HS, JJ, HP, DIS, TP As String
cbokode = Right(cbokode, 5)
Select Case cbokode
Case “P205”
JK = “Pentium II 500 Mega Hz”
HS = “1.500.000”
Case “P308”
JK = “Pentium III 800 Mega Hz”
HS = “2.100.000”
Case “P310”
JK = “Pentium III 1.0 Giga Hz”
HS = “3.500.000”
Case “P415”
JK = “Pentium IV 1.5 Giga Hz”
HS = “4.000.000”
Case “P417”
JK = “Pentium IV 1.7 Giga Hz”
HS = “4.200.000”
Case “P419”
JK = “Pentium IV 1.9 Giga Hz”
HS = “5.500.000”
End Select

cbokode.Text = (cbokode.Text)
txtjj.SetFocus
txtjk = JK
txths = HS
txtjj = JJ
txthp = HP
txtdis = DIS
txttp = TP

End Sub

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
cbokode = “(pilih kode)”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
cbokode = “(pilih kode)”
txtjk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txttp = “”
txtprs = “”
End Sub

Private Sub cmdproses_Click()
txthp = txths * txtjj
If txthp > 40000000 Then
txtdis = txthp * 0.15
txttp = txthp – txtdis
txtprs = “15%”
ElseIf txthp > 35000000 Then
txtdis = txthp * 0.1
txttp = txthp – txtdis
txtprs = “10%”
ElseIf txthp > 30000000 Then
txtdis = txthp * 0.05
txttp = txthp – txtdis
txtprs = “5%”
ElseIf txthp > 25000000 Then
txtdis = txthp * 0.02
txttp = txthp – txtdis
txtprs = “2%”
ElseIf txthp > 0 Then
txtdis = txthp * 0
txttp = txthp – txtdis
txtprs = “0%”
End If
End Sub

Private Sub cmdsimpan_Click()
Data1.Recordset.Update
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

 

 

PROGRAM 9

TUGAS I

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtnk.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtnk.SetFocus
txtnk = “”
txtnik = “”
txtgol = “”
txtks = “”
txtstat = “”
txtth = “”
txtjb = “”
txtbg = “”
txtgp = “”
txttj = “”
txttg = “”

End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtnk.SetFocus
txtnk = “”
txtnik = “”
txtgol = “”
txtks = “”
txtstat = “”
txtth = “”
txtjb = “”
txtbg = “”
txtgp = “”
txttj = “”
txttg = “”

End Sub

Private Sub cmdproses_Click()
Dim GOL, KS, ST, TH, JB, BG, GP, TJ, TG, NIK As Integer
TH = Left(txtnik, 4)
GOL = Mid(txtnik, 5, 1)
If GOL = “A” Then
JB = “Manajer”
GP = “4.000.000”
TJ = “1.025.000”
ElseIf GOL = “B” Then
JB = “Ka. Seksi”
GP = “3.500.000”
TJ = “975.000”
ElseIf GOL = “C” Then
JB = “Staff”
GP = “3.000.000”
TJ = “925.000”
End If

ST = Mid(txtnik, 7, 1)
If ST = “S” Then
ST = “Single”
KS = “S”
ElseIf ST = “M” Then
ST = “Menikah”
KS = “M”
ElseIf ST = “J” Then
ST = “Janda”
KS = “J”
ElseIf ST = “D” Then
ST = “Duda”
KS = “D”
End If

BG = Right(txtnik, 3)
If BG = “KEU” Then
BG = “Accounting”
ElseIf BG = “ADM” Then
BG = “Administrasi”
ElseIf BG = “SDM” Then
BG = “General Affair”
ElseIf BG = “EDP” Then
BG = “IT Unit”
ElseIf BG = “SPM” Then
BG = “Security”
End If

TG = txttj + txtgp
txtgol = GOL
txtks = KS
txtstat = ST
txtth = TH
txtjb = JB
txtbg = BG
txtgp = GP
txttj = TJ
txttg = TG
txtnik = NIK
End Sub

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

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

 

 

PROGRAM 10

TUGAS J

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtps = “”
txttm = “”
txtnu = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtps = “”
txttm = “”
txtnu = “”
End Sub

Private Sub cmdproses_Click()
Dim NPM, JUR, PS, TM, NU As String
TM = “20” + Left(txtnpm, 2)
NPM = Mid(txtnpm, 3, 1)
If NPM = “1” Then
JUR = “Sistem Informasi”
ElseIf NPM = “2” Then
JUR = “Teknik Informatika”
ElseIf NPM = “3” Then
JUR = “Manajemen Informatika”
ElseIf NPM = “4” Then
JUR = “Manajemen & Komputer Akutansi”
End If

NPM = Mid(txtnpm, 4, 2)
If NPM = “00” Or “01” Then
PS = “Strata Satu”
ElseIf NPM = “02” Then
PS = “Diploma Empat”
ElseIf NPM = “03” Then
PS = “Diploma Tiga”
ElseIf NPM = “04” Then
PS = “Diploma Dua”
End If

NU = Right(txtnpm, 3)
NPM = (txtnpm)
txtnpm = NPM
txtjur = JUR
txtps = PS
txttm = TM
txtnu = NU
End Sub

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

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

Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim NPM, JUR, PS, TM, NU As String
TM = “20” + Left(txtnpm, 2)
NPM = Mid(txtnpm, 3, 1)
If NPM = “1” Then
JUR = “Sistem Informasi”
ElseIf NPM = “2” Then
JUR = “Teknik Informatika”
ElseIf NPM = “3” Then
JUR = “Manajemen Informatika”
ElseIf NPM = “4” Then
JUR = “Manajemen & Komputer Akutansi”
End If

NPM = Mid(txtnpm, 4, 2)
If NPM = “00” Or “01” Then
PS = “Strata Satu”
ElseIf NPM = “02” Then
PS = “Diploma Empat”
ElseIf NPM = “03” Then
PS = “Diploma Tiga”
ElseIf NPM = “04” Then
PS = “Diploma Dua”
End If

NU = Right(txtnpm, 3)
NPM = (txtnpm)
txtnpm = NPM
txtjur = JUR
txtps = PS
txttm = TM
txtnu = NU
End If
End Sub

 

 

PROGRAM 11

TUGAS K

Private Sub cbogol_Click()
Dim GP, TJ, PJ, TT As String
Select Case cbogol
Case “I”
GP = “1500000”
TJ = “150000”
Case “II”
GP = “2000000”
TJ = “200000”
Case “III”
GP = “2500000”
TJ = “250000”
Case “IV”
GP = “3000000”
TJ = “300000”
Case Else
GP = “0”
TJ = “0”
End Select
txtgp = GP
txttj = TJ
txtpj = PJ
txttt = TT
PJ = Val(txtgp + txttj) * 0.1
TT = Val(txtgp + txttj) – Val(txtpj)

End Sub

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtnidn.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtnidn.SetFocus
txtnidn = “”
txtnp = “”
cbogol = “”
txtgp = “”
txttj = “”
txtpj = “”
txttt = “”

End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtnidn.SetFocus
txtnidn = “”
txtnp = “”
cbogol = “”
txtgp = “”
txttj = “”
txtpj = “”
txttt = “”

End Sub

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

Private Sub Form_Load()
cbogol.AddItem “I”
cbogol.AddItem “II”
cbogol.AddItem “III”
cbogol.AddItem “IV”

End Sub

 

 

PROGRAM 12

TUGAS L

Private Sub cmdbaru_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtps = “”
txttm = “”
txtnu = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtps = “”
txttm = “”
txtnu = “”
End Sub

Private Sub cmdproses_Click()
Dim NPM, JUR, PS, TM As String
TM = “20” + Left(txtnpm, 2)
NPM = Mid(txtnpm, 3, 1)
If NPM = “1” Then
JUR = “Sistem Informasi”
ElseIf NPM = “2” Then
JUR = “Teknik Informatika”
ElseIf NPM = “3” Then
JUR = “Manajemen Informatika”
ElseIf NPM = “4” Then
JUR = “Manajemen & Komputer Akutansi”
End If

NPM = Mid(txtnpm, 4, 2)
If NPM = “00” Or “01” Then
PS = “Strata Satu”
ElseIf NPM = “02” Then
PS = “Diploma Empat”
ElseIf NPM = “03” Then
PS = “Diploma Tiga”
ElseIf NPM = “04” Then
PS = “Diploma Dua”
End If

NPM = (txtnpm)
txtnpm = NPM
txtjur = JUR
txtps = PS
txttm = TM
End Sub

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

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

Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim NPM, JUR, PS, TM, NU As String
TM = “20” + Left(txtnpm, 2)
NPM = Mid(txtnpm, 3, 1)
If NPM = “1” Then
JUR = “Sistem Informasi”
ElseIf NPM = “2” Then
JUR = “Teknik Informatika”
ElseIf NPM = “3” Then
JUR = “Manajemen Informatika”
ElseIf NPM = “4” Then
JUR = “Manajemen & Komputer Akutansi”
End If

NPM = Mid(txtnpm, 4, 2)
If NPM = “00” Or “01” Then
PS = “Strata Satu”
ElseIf NPM = “02” Then
PS = “Diploma Empat”
ElseIf NPM = “03” Then
PS = “Diploma Tiga”
ElseIf NPM = “04” Then
PS = “Diploma Dua”
End If

NU = Right(txtnpm, 3)
NPM = (txtnpm)
txtnpm = NPM
txtjur = JUR
txtps = PS
txttm = TM
txtnu = NU
End If
End Sub

 

 

PROGRAM 13

TUGAS M

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

Private Sub cmdbatal_Click()
Data1.Recordset.Delete
End Sub

Private Sub cmdhitung_Click()
txtby = txthb * txtjb
txtptong = txtby * 0.02
txttb = txtby – txtptong
End Sub

Private Sub cmdkeluar_Click()
If MsgBox(“Anda Yakin Ingin Keluar?”, vbQuestion + vbYesNo, “Quit”) = vbYes Then
End
End If
End Sub

Private Sub cmdproses_Click()
Dim NB, HB, KB, JB, BY, PTO, TB As String
KB = Mid(txtkb, 5, 2)
If KB = “SP” Then
NB = “SPIDOL”
HB = “9500”
ElseIf KB = “BT” Then
NB = “BUKU TULIS”
HB = “12500”
ElseIf KB = “TP” Then
NB = “TIPEX”
HB = “3000”
ElseIf KB = “PG” Then
NB = “PENGGARIS”
HB = “25000”
ElseIf KB = “PT” Then
NB = “PAPAN TULIS”
HB = “50000”
End If
txtkb = Val(txtkb)
txtjb.SetFocus
txtkb = KB
txtnb = NB
txthb = HB
txtby = BY
txtptong = PTO
txttb = TB

End Sub

Private Sub cmdsimpan_Click()
Data1.Recordset.Update
End Sub
Private Sub txtkb_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim NB, HB, KB, JB, BY, PTO, TB As String
KB = Mid(txtkb, 5, 2)
If KB = “SP” Then
NB = “SPIDOL”
HB = “9500”
ElseIf KB = “BT” Then
NB = “BUKU TULIS”
HB = “12500”
ElseIf KB = “TP” Then
NB = “TIPEX”
HB = “3000”
ElseIf KB = “PG” Then
NB = “PENGGARIS”
HB = “25000”
ElseIf KB = “PT” Then
NB = “PAPAN TULIS”
HB = “50000”
End If
txtkb = Val(txtkb)
txtjb.SetFocus
txtkb = KB
txtnb = NB
txthb = HB
txtby = BY
txtptong = PTO
txttb = TB
txtby = Val(txthb.Text) * Val(txtjb.Text)
txtptong = Val(txtjb.Text) * 0.02
txttb = Val(txtjb.Text) – Val(txtptong.Text)
End If
End Sub

 

tugas 3

febri3

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

 

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

 

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 = “Manajemen Informatika”

ElseIf s = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf s = “4” Then

Txtjur.Text = “Manajemen & Komp. Akuntansi”

End If

s = Mid(Txtnpm.Text, 3, 1)

If s = “1” Then

Txtps.Text = “Strata Satu”

ElseIf s = “2” Then

Txtps.Text = “Diploma Tiga”

ElseIf s = “3” Then

Textps.Text = “Diploma Empat”

ElseIf s = “4” Then

Txtps.Text = “Diploma Dua”

End If

Txturut.Text = Right(Txtnpm.Text, 3)

 

End Sub

 

Private Sub Textnama_Change()

Private Sub Form_activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

End Sub

 

Private Sub Textnama_Keypress(Keyascii As Integer)

If Keyascii = 13 Then

Textnpm.SetFocus

End If

 

End Sub

 

tugas 2

FERI NPM,

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

 

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

 

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 = “Manajemen Informatika”

ElseIf s = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf s = “4” Then

Txtjur.Text = “Manajemen & Komp. Akuntansi”

End If

s = Mid(Txtnpm.Text, 3, 1)

If s = “1” Then

Txtps.Text = “Strata Satu”

ElseIf s = “2” Then

Txtps.Text = “Diploma Tiga”

ElseIf s = “3” Then

Textps.Text = “Diploma Empat”

ElseIf s = “4” Then

Txtps.Text = “Diploma Dua”

End If

Txturut.Text = Right(Txtnpm.Text, 3)

 

End Sub

 

Private Sub Textnama_Change()

Private Sub Form_activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txturut.Text = “”

End Sub

 

Private Sub Textnama_Keypress(Keyascii As Integer)

If Keyascii = 13 Then

Textnpm.SetFocus

End If

 

End Sub

tugas 1

FEBRI GAJI

Private Sub Cbogolongan_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case Cbogolongan.Text

Case “I”

gapok = 1500000

tunjangan = 150000

Case “II”

gapok = 2000000

tunjangan = 200000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 3000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok.Text = gapok

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

End Sub

 

Private Sub cmdbatal_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

txtnama.Text = “”

Cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub Cmdlagi_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

txtnama.Text = “”

Cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

 

End Sub

 

Private Sub Form_Load()

Cbogolongan.AddItem “I”

Cbogolongan.AddItem “II”

Cbogolongan.AddItem “III”

Cbogolongan.AddItem “IV”

 

End Sub

TUGAS TIPE I

FEBRI I

Private Sub cmdbatal_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtkstat = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotg = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtkstat = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotg = “”

End Sub

 

Private Sub cmdproses_Click()

Dim r As String

r = Mid(txtnik.Text, 5, 1)

If r = “A” Then

txtgol = “A”

txtjbt.Text = “MANAGER”

txtgapok.Text = “4000000”

txttunjangan.Text = “1025000”

ElseIf r = “B” Then

txtgol.Text = “B”

txtjbt.Text = “Ka.SEKSI”

txtgapok.Text = “3500000”

txttunjangan.Text = “975000”

ElseIf r = “C” Then

txtgol.Text = “C”

txtjbt.Text = “STAFF”

txtgapok.Text = “3000000”

txttunjangan.Text = “925000”

End If

r = Right(txtnik.Text, 3)

If r = “KEU” Then

txtbagian.Text = “ACCOUNTING”

ElseIf r = “ADM” Then

txtbagian.Text = “ADMINISTRASI”

ElseIf r = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

ElseIf r = “EDP” Then

txtbagian.Text = “IT UNIT”

ElseIf r = “SPM” Then

txtbagian.Text = “SECURITY”

End If

r = Mid(txtnik.Text, 7, 1)

If r = “S” Then

kode = “S”

Status = “SINGLE”

ElseIf r = “M” Then

kode = “M”

Status = “MENIKAH”

ElseIf r = “J” Then

kode = “J”

Status = “JANDA”

ElseIf r = “D” Then

kode = “D”

Status = “DUDA”

End If

txtkstat.Text = kode

txtstatus.Text = Status

txttahun.Text = Left(txtnik.Text, 4)

txttotg.Text = Val(txtgapok.Text) + Val(txttunjangan.Text)

End Sub

 

 

 

TUGAS TIPE H

FEBRI H

 

Private Sub cbokode_Click()

Dim jk, hs, TB As Integer

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.Text = jk

Txths.Text = hs

Txtjj.SetFocus

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

Txtjk.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txthp.Text = “”

Txtdis.Text = “”

Txttb.Text = “”

End Sub

Private Sub Cmdproses_Click()

Txthp.Text = Val(Txths) * Val(Txtjj)

Select Case Txthp.Text

Case Is > 40000000

Txtdis.Text = Val(Txthp) * 0.15

Case Is > 35000000

Txtdis.Text = Val(Txthp) * 0.1

Case Is > 30000000

Txtdis.Text = Val(Txthp) * 0.05

Case Is > 25000000

Txtdis.Text = Val(Txthp) * 0.02

End Select

Txttb.Text = Val(Txthp) – Val(Txtdis)

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

Private Sub Txtjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txthp.Text = Val(Txths) * Val(Txtjj)

Select Case Txthp.Text

Case Is > 40000000

Txtdis.Text = Val(Txthp) * 0.15

Case Is > 35000000

Txtdis.Text = Val(Txthp) * 0.1

Case Is > 30000000

Txtdis.Text = Val(Txthp) * 0.05

Case Is > 25000000

Txtdis.Text = Val(Txthp) * 0.02

End Select

Txttb.Text = Val(Txthp) – Val(Txtdis)

End If

 

End Sub

TUGAS TIPE G

FEBRI G

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnpm = “”

Txtjur = “”

Txtps = “”

Txttm = “”

Txturut = “”

Txtbp = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnpm = “”

Txtjur = “”

Txtps = “”

Txttm = “”

Txturut = “”

Txtbp = “”

 

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”

Txtps.Text = “strata satu”

Txtbp.Text = “1.950.000”

ElseIf s = “2” Then

Txtjur.Text = “tehnik informatika”

Txtps.Text = “diploma empat”

Txtbp.Text = “1.750.000”

ElseIf s = “3” Then

Txtjur.Text = “manajemen informatika”

Txtps.Text = “diploma tiga”

Txtbp.Text = “1.650.000”

ElseIf s = “4” Then

Txtjur.Text = “Manajemen & Komp. Akuntansi”

Txtps.Text = “diploma dua”

Txtbp.Text = “1.450.000”

End If

Txturut.Text = Right(Txtnpm.Text, 3)

 

End Sub

TUGAS TIPE F

FEBRI F

Private Sub cbokode_Click()

Dim MT, HS, JJ, HP, DIS, TP As String

cbokode = Right(cbokode, 5)

 

Select Case cbokode

Case “A43SA”

MT = “Asus A43SA-VX090D”

HS = “5.500.000”

Case “A43SD”

MT = “Asus A43SD-VX052D”

HS = “4.500.000”

Case “A43SJ”

MT = “Asus A43SJ-VX792D”

HS = “4.300.000”

Case “A43TA”

MT = “Asus A43TA-VX034D”

HS = “4.900.000”

Case “N43SL”

MT = “Asus N43SL-VX264D”

HS = “4.300.000”

Case “MD311”

MT = “Apple MacBook Pro MD311”

HS = “19.300.000”

Case “MD313”

MT = “Apple MacBook Pro MD313”

HS = “24.200.000”

Case “MD314”

MT = “Apple MacBook Pro MD314”

HS = “11.900.000”

Case “MD322”

MT = “Apple MacBook Pro MD322”

HS = “14.700.000”

Case “MC965”

MT = “Apple MacBook Air MC965”

HS = “21.300.000”

End Select

cbokode.Text = (cbokode.Text)

txtjj.SetFocus

txtmerk = MT

txths = HS

txtjj = JJ

txthp = HP

txtdis = DIS

txttp = TP

 

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdlagi_Click()

cbokode = “(pilih kode)”

txtmerk = “”

txths = “”

txtjj = “”

txthp = “”

txtdis = “”

txttp = “”

 

End Sub

 

Private Sub cmdproses_Click()

txthp = txths * txtjj

If txthp > 140000000 Then

txtdis = txthp * 0.15

txttp = txthp – txtdis

txtprs = “15%”

ElseIf txthp > 135000000 Then

txtdis = txthp * 0.1

txttp = txthp – txtdis

txtprs = “10%”

ElseIf txthp > 130000000 Then

txtdis = txthp * 0.05

txttp = txthp – txtdis

txtprs = “5%”

ElseIf txthp > 125000000 Then

txtdis = txthp * 0.02

txttp = txthp – txtdis

txtprs = “2%”

ElseIf txthp > 0 Then

txtdis = txthp * 0

txttp = txthp – txtdis

txtprs = “0%”

End If

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “Asus A43SA”

cbokode.AddItem “Asus A43SD”

cbokode.AddItem “Asus A43SJ”

cbokode.AddItem “Asus A43TA”

cbokode.AddItem “Asus N43SL”

cbokode.AddItem “Apple MD311”

cbokode.AddItem “Apple MD313”

cbokode.AddItem “Apple MD314”

cbokode.AddItem “Apple MD322”

cbokode.AddItem “Apple MC965”

 

End Sub

TEGAS TIPE E

FEBRI E.

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb = “”

txtjb = “”

txtpeng = “”

txttahun = “”

txtpen = “”

txthg = “”

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdlagi_Click()

txtkb.SetFocus

txtkb = “”

txtjb = “”

txtpeng = “”

txttahun = “”

txtpen = “”

txthg = “”

End Sub

 

Private Sub cmdproses_Click()

Dim KB, JB, PG, TT, PN, HG As String

KB = Left(txtkb, 3)

If KB = “SIM” Then

JB = “Sistem Informasi Manajemen”

PG = “Fadiya Ulfa”

HG = “Rp.75.900,-”

ElseIf KB = “EDP” Then

JB = “Electronic Data Processing”

PG = “Nurul Agustina”

HG = “Rp.62.000,-”

ElseIf KB = “MNJ” Then

JB = “Manajemen”

PG = “Rian Hidayat”

HG = “Rp.42.000,-”

ElseIf KB = “CDR” Then

JB = “Corel Draw”

PG = “Siti Nur Khotimah”

HG = “Rp.53.000,-”

ElseIf KB = “RPL” Then

JB = “Rekayasa Perangkat Lunak”

PG = “Winda Erlianti”

HG = “Rp.83.000,-”

 

End If

 

KB = Right(txtkb, 1)

If KB = “A” Then

PN = “Andi Offset Yogyakarta”

ElseIf KB = “I” Then

PN = “Indah Surabaya”

ElseIf KB = “S” Then

PN = “Salemba Empat”

ElseIf KB = “E” Then

PN = “Elek Media Komputindo”

ElseIf KB = “M” Then

PN = “Maxicom”

End If

 

TT = “20” + Mid(txtkb, 5, 2)

KB = (txtkb.Text)

txtkb = KB

txtjb = JB

txtpeng = PG

txttahun = TT

txtpen = PN

txthg = HG

 

End Sub