tugas semester 3

HSAAAN

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txtnu = “”

txtbp = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

If MsgBox(“Serius Bro Mau Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then

End

End If

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txtnu = “”

txtbp = “”

 

End Sub

 

Private Sub cmdproses_Click()

Dim NAMA, NPM, JUR, PS, TM, NU, BP As String

TM = “20” + Left(txtnpm, 2)

NPM = Mid(txtnpm, 3, 1)

If NPM = “1” Then

JUR = “Sistem Informasi”

ElseIf NPM = “2” Then

JUR = “Tekhnik Informatika”

ElseIf NPM = “3” Then

JUR = “Manajemen Informatika”

ElseIf NPM = “4” Then

JUR = “Manajemen & Komputer Akuntansi”

End If

 

NPM = Mid(txtnpm, 4, 2)

If NPM = “00” Or “01” Then

PS = “Strata Satu”

BP = “Rp.1.950.000,-”

ElseIf NPM = “02” Then

PS = “Diploma Empat”

BP = “Rp.1.750.000,-”

ElseIf NPM = “03” Then

PS = “Diploma Tiga”

BP = “Rp.1.650.000,-”

ElseIf NPM = “04” Then

PS = “Diploma Dua”

BP = “Rp.1.450.000,-”

End If

NPM = (txtnpm)

NU = Right(txtnpm, 3)

 

txtnu = NU

txtps = PS

txtbp = BP

txtjur = JUR

txtnpm = NPM

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

Iklan

TUGAS DATA BASE

1.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(“Serius Bro Mau 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

2B

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 AKAN 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

3C

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 cmdclose_Click()
If MsgBox(“Serius Bro Mau Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
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 Command1_Click()
Data1.Recordset.AddNew
cbokode = “(pilih kode)”
txthp = “”
txthb = “”
txtdis = “”
txtprs = “”
End Sub

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

Private Sub Command3_Click()
Data1.Recordset.Delete
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

4D

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

End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete

End Sub

Private Sub Cmdproses_Click()
Dim jb, pg, pn, hg As String
Txttahun.Text = “20” & Right(Cbokode, 2)
S = Mid(Cbokode, 3, 3)
If S = “SIM” Then
jb = “Sistem informasi manajemen”
pg = “YatiNurOktavia”
hg = “75900”
ElseIf S = “EDP” Then
jb = “Elektronik Data Processing”
pg = “Imam Tarmizi”
hg = “62000”
ElseIf S = “MNJ” Then
jb = “Manajemen”
pg = “Valentina Mariana Adiwianti”
hg = “42000”
ElseIf S = “CDR” Then
jb = “Corel Draw”
pg = “Riyan Suhandi”
hg = “53000”
ElseIf S = “RPL” Then
jb = “RekayasaPerangkatLunak”
pg = “SintaUmpuSinga”
hg = “83000”
End If
Txtjudul.Text = jb
Txtpengarang.Text = pg
Txtharga.Text = hg
S = Mid(Cbokode, 1, 1)
If S = “A” Then
pn = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
pn = “Indah Surabaya”
ElseIf S = “S” Then
pn = “SalembaEmpat”
ElseIf S = “E” Then
pn = “Elek Media Komputindo”
ElseIf S = “M” Then
pn = “Maxicom”
End If
Txtpenerbit.Text = pn
End Sub

Private Sub Command1_Click()

End Sub

Private Sub cmdsimpan_Click()
Data1.Recordset.Update

End Sub

Private Sub Form_Load()
Cbokode.AddItem “A-SIM-01”
Cbokode.AddItem “I-EDP-02”
Cbokode.AddItem “S-MNJ-03”
Cbokode.AddItem “E-CDR-04”
Cbokode.AddItem “M-RPL-05”
End Sub
Private Sub cmdbatal_Click()
Cbokode.SetFocus
Cbokode.Text = “”
Txtjudul.Text = “”
Txtpengarang.Text = “”
Txttahun.Text = “”
Txtpenerbit.Text = “”
Txtharga.Text = “”
End Sub
Private Sub cmdkeluar_Click()
If MsgBox(“ANDA YAKIN AKAN KELUAR”, vbQuestion + vbYesNo, “EXIT”) = vbYes Then
End
End If

End Sub
Private Sub cmdlagi_Click()
Cbokode.SetFocus
Cbokode.Text = “”
Txtjudul.Text = “”
Txtpengarang.Text = “”
Txttahun.Text = “”
Txtpenerbit.Text = “”
Txtharga.Text = “”
End Sub

5B

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(“Serius Bro Mau 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

6F

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(“Serius Bro Mau 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

7G

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

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

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

Private Sub cmdkeluar_Click()
If MsgBox(“Serius Bro Mau Keluar?”, vbQuestion + vbYesNo, “quit”) = vbYes Then
End
End If
End Sub

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

End Sub

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

NPM = Mid(txtnpm, 4, 2)
If NPM = “00” Or “01” Then
PS = “Strata Satu”
BP = “Rp.1.950.000,-”
ElseIf NPM = “02” Then
PS = “Diploma Empat”
BP = “Rp.1.750.000,-”
ElseIf NPM = “03” Then
PS = “Diploma Tiga”
BP = “Rp.1.650.000,-”
ElseIf NPM = “04” Then
PS = “Diploma Dua”
BP = “Rp.1.450.000,-”
End If
NPM = (txtnpm)
NU = Right(txtnpm, 3)

txtnu = NU
txtps = PS
txtbp = BP
txtjur = JUR
txtnpm = NPM
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

8H

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(“Serius Bro Mau 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

9I

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(“Serius Bro Mau 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

10K

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 AKAN 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

11J

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 AKAN 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

12K

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 AKAN 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

 

13HASAN 13

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 AKAN 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

tugas 3 program

program 1

TUGAS 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

program 2

TUGAS 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

program 3

HASAN

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 9 program

TUGAS A

TUGAS A

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Txtkt.SetFocus

Txtkt = “”

Txtht = “”

Txtjk = “”

Txtjb = “”

Textjt = “”

Txttotalp = “”

 

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

S = Left(Txtkt.Text, 3)

If S = “BIM” Then

Txtjk.Text = “BIMA”

Txtht.Text = “50000”

Txtjb.Text = “16.00 WIB”

ElseIf S = “EKO” Then

Txtjk.Text = “EKONOMI”

Txtht.Text = “35000”

Txtjb.Text = “19.00 WIB”

ElseIf S = “MUT” Then

Txtjk.Text = “MUTIARA”

Txtht.Text = “23000”

Txtjb.Text = “17.00 WIB”

ElseIf S = “SEN” Then

Txtjk.Text = “SENJA”

Txtht.Text = “15000”

Txtjb.Text = “20.00 WIB”

End If

Txttotalp.Text = Val(Txtht.Text) * Val(Textjt.Text)

 

End Sub

 

Private Sub Textjt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttotalp.Text = Val(Txtht.Text) * Val(Textjt.Text)

End If

 

End Sub

 

Private Sub Txtkt_KeyPress(KeyAscii As Integer)

Dim S As String

S = Left(Txtkt.Text, 3)

If S = “BIM” Then

Txtjk.Text = “BIMA”

Txtht.Text = “50000”

Txtjb.Text = “16.00 WIB”

ElseIf S = “EKO” Then

Txtjk.Text = “EKONOMI”

Txtht.Text = “35000”

Txtjb.Text = “19.00 WIB”

ElseIf S = “MUT” Then

Txtjk.Text = “MUTIARA”

Txtht.Text = “23000”

Txtjb.Text = “17.00 WIB”

ElseIf S = “SEN” Then

Txtjk.Text = “SENJA”

Txtht.Text = “15000”

Txtjb.Text = “20.00 WIB”

End If

If KeyAscii = 13 Then

Textjt.SetFocus

End If

 

End Sub

TUGAS B

HSAN HAFIDIN

Private Sub cmdbatal_Click(Index As Integer)

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

End Sub

 

Private Sub cmdkeluar_Click(Index As Integer)

End

End Sub

 

Private Sub cmdlagi_Click()

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

 

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

txttahun.Text = “20” & Right(txtkb, 2)

S = Mid(txtkb, 3, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Andra Setiawan”

txthg.Text = “75900”

ElseIf S = “EDP” Then

txtjb.Text = “lektronik Data Processing”

txtp.Text = “Desi Istiqomah”

txthg.Text = “62000”

ElseIf S = “MNJ” Then

txtjb.Text = “Manajemen”

txtp.Text = “Sandy Fitriajaya”

txthg.Text = “42000”

ElseIf S = “CDR” Then

txtjb.Text = “Corel Draw”

txtp.Text = “Tri Indah Sari”

txthg.Text = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Ernita Sari”

txthg.Text = “83000”

End If

S = Left(txtkb, 1)

If S = “A” Then

txtpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

txtpenerbit.Text = “Indah Surabaya”

ElseIf S = “S” Then

txtpenerbit.Text = “Salemba Empat”

ElseIf S = “E” Then

txtpenerbit.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

txtpenerbit.Text = “Maxicom”

End If

End Sub

TUGAS C

TUGAS C

 

Private Sub Cbokode_Click()

Dim jenis, hs As String

Select Case Cbokode

Case “P205”

jenis = “Pentium II 500 Mega Hz”

hs = “1500000”

Case “P308”

jenis = “Pentium III 800 Mega Hz ”

hs = “2100000 ”

Case “P310”

jenis = “pentium III 1.0 Giga Hz”

hs = “3500000 ”

Case “P415”

jenis = “Pentium IV 1.5 Giga Hz”

hs = “4000000 ”

Case “P417”

jenis = “Pentium IV 1.7 Giga Hz ”

hs = “4200000 ”

Case “P419”

jenis = “Pentium IV 1.9 Giga Hz”

hs = “5500000 ”

End Select

Txtjk = jenis

Txths = hs

Txtjj.SetFocus

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Cbokode.SetFocus

Cbokode = “”

Txtjk = “”

Txths = “”

Txtjj = “”

Txthp = “”

Txtdis = “”

Txthb = “”

End Sub

Private Sub Cmdproses_Click()

Txthp = Val(Txtjj) * Val(Txths)

If Val(Txthp) > “30000000” Then

Txtdis = Val(Txthp.Text) * 15 / 100

ElseIf Val(Txthp) > “25000000” Then

Txtdis = Val(Txthp.Text) * 10 / 100

ElseIf Val(Txthp) > “20000000” Then

Txtdis = Val(Txthp.Text) * 5 / 100

ElseIf Val(Txthp) > “15000000” Then

Txtdis = Val(Txthp.Text) * 2 / 100

End If

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

End Sub

Private Sub Form_Activate()

Cbokode.SetFocus

Cbokode = “”

Txtjk = “”

Txths = “”

Txtjj = “”

Txtdis = “”

Txthb = “”

 

Cbokode.AddItem “P205”

Cbokode.AddItem “P308”

Cbokode.AddItem “P310”

Cbokode.AddItem “P415”

Cbokode.AddItem “P417”

Cbokode.AddItem “P419”

End Sub

 

 TUGAS D

TUGAS D

Private Sub Cmdproses_Click()

Dim jb, pg, pn, hg As String

Txttahun.Text = “20” & Right(Cbokode, 2)

S = Mid(Cbokode, 3, 3)

If S = “SIM” Then

jb = “Sistem informasi manajemen”

pg = “YatiNurOktavia”

hg = “75900”

ElseIf S = “EDP” Then

jb = “Elektronik Data Processing”

pg = “Imam Tarmizi”

hg = “62000”

ElseIf S = “MNJ” Then

jb = “Manajemen”

pg = “Valentina Mariana Adiwianti”

hg = “42000”

ElseIf S = “CDR” Then

jb = “Corel Draw”

pg = “Riyan Suhandi”

hg = “53000”

ElseIf S = “RPL” Then

jb = “RekayasaPerangkatLunak”

pg = “SintaUmpuSinga”

hg = “83000”

End If

Txtjudul.Text = jb

Txtpengarang.Text = pg

Txtharga.Text = hg

S = Mid(Cbokode, 1, 1)

If S = “A” Then

pn = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

pn = “Indah Surabaya”

ElseIf S = “S” Then

pn = “SalembaEmpat”

ElseIf S = “E” Then

pn = “Elek Media Komputindo”

ElseIf S = “M” Then

pn = “Maxicom”

End If

Txtpenerbit.Text = pn

End Sub

Private Sub Form_Load()

Cbokode.AddItem “A-SIM-01”

Cbokode.AddItem “I-EDP-02”

Cbokode.AddItem “S-MNJ-03”

Cbokode.AddItem “E-CDR-04”

Cbokode.AddItem “M-RPL-05”

End Sub

Private Sub cmdbatal_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjudul.Text = “”

Txtpengarang.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjudul.Text = “”

Txtpengarang.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

 TUGAS E

Capture

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

TUGAS F

Capture

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

TUGAS G

TUGAS 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 H

TUGAS 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 I

TUGAS 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 pemprograman

Capture

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 txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

tugas pemprograman

Capture

Private Sub cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case cbonpm.Text

Case “15100201”

nama = “AFRIZA UTAMA”

jurusan = “SISTEM INFORMASI”

Case “15100120”

nama = “A.N IMAM BUCHORI”

jurusan = “MANAJEMEN INFORMASI”

Case “15100197”

nama = “AGUNG PRAMUDI”

jurusan = “SISTEM INFORMASI”

Case “15100196”

nama = “ALI MARWAN”

jurusan = “SISTEM INFORMASI”

Case “15100140”

nama = “ANDI SUCIPTO”

jurusan = “SISTEM INFORMASI”

Case “15100125”

nama = “ANDRI AGUNG DWI SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100203”

nama = “ARGA PURNAMA AJI”

jurusan = “SISTEM INFORMASI”

Case “15100121”

nama = “AYU ALFANI”

jurusan = “SISTEM INFORMASI”

Case “15100135”

nama = “AYU KRISMIATI”

jurusan = “SISTEM INFORMASI”

Case “15100127”

nama = “BAYU EKA ALFIANTO”

jurusan = “SISTEM INFORMASI”

Case “15100199”

nama = “BAYU PRABOWO”

jurusan = “SISTEM INFORMASI”

Case “15201018”

nama = “DESI IRSANTI”

jurusan = “MANAJEMEN INFORMATIKA”

Case “15100122”

nama = “DIAN SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100130”

nama = “DIKI DIANTORO”

jurusan = “SISTEM INFORMASI”

Case “15100118”

nama = “ERLANGGA NURFERNANDO”

jurusan = “SISTEM INFORMASI”

Case “15100126”

nama = “ERMA DWIYANI”

jurusan = “SISTEM INFORMASI”

Case “15100116”

nama = “FAQIHUDDIN”

jurusan = “SISTEM INFORMASI”

Case “15100138”

nama = “FEBRI ARIYANTO”

jurusan = “SISTEM INFORMASI”

Case “15100198”

nama = “FEBRIANSYAH”

jurusan = “SISTEM INFORMASI”

Case “15100128”

nama = “HASAN HAFIDIN”

jurusan = “SISTEM INFORMASI”

Case “15100124”

nama = “ITA FIBRIYANTI”

jurusan = “SISTEM INFORMASI”

Case “15100131”

nama = “KUKUH PRASETYO”

jurusan = “SISTEM INFORMASI”

Case “15100139”

nama = “M.ARYA BIMO RIFKI”

jurusan = “SISTEM INFORMASI”

Case “15100123”

nama = “MAD MUHAIDI”

jurusan = “SISTEM INFORMASI”

Case “15100136”

nama = “MAR’ATUS SHOLEHAH”

jurusan = “SISTEM INFORMASI”

Case “15100117”

nama = “MAYMANAH”

jurusan = “SISTEM INFORMASI”

Case “15100202”

nama = “RINANDA”

jurusan = “SISTEM INFORMASI”

Case “15100133”

nama = “RISKI SAFITRA RAMADON”

jurusan = “SISTEM INFORMASI”

Case “15100195”

nama = “RULLY INDRIANTO”

jurusan = “SISTEM INFORMASI”

Case “1510032”

nama = “SELTARINA”

jurusan = “SISTEM INFORMASI”

Case “15100206”

nama = “SITI MUKODIMAH”

jurusan = “SISTEM INFORMASI”

Case “15100205”

nama = “SUPRAPTI”

jurusan = “SISTEM INFORMASI”

Case “13100457”

nama = “SUSANTO”

jurusan = “SISTEM INFORMASI”

Case “15100137”

nama = “TIARA HERMADITA”

jurusan = “SISTEM INFORMASI”

Case “15100134”

nama = “WAHYU CANDRA WIJAYA”

jurusan = “SISTEM INFORMASI”

Case “15100129”

nama = “YELI FITRI LIANUARI”

jurusan = “SISTEM INFORMASI”

Case “15100119”

nama = “YUDA FERDIANTARA”

jurusan = “SISTEM INFORMASI”

 

End Select

Textnama.Text = nama

Textjurusan.Text = jurusan

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdkembali_Click()

cbonpm.SetFocus

cbonpm = “”

txtnama = “”

txtjurusan = “”

Txtquis = “”

Txttugas = “”

Txtuts = “”

Txtuas = “”

Txtna = “”

Txthm = “”

 

End Sub

 

Private Sub CmdProses_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(Txtquis)

TUGAS = Val(Txttugas)

UTS = Val(Txtuts)

UAS = Val(Txtuas)

NA = (QUIS + TUGAS + UTS + UAS) / 4

Txtna = NA

 

Select Case Txtna

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

Txthm = HM

 

 

End Sub

 

Private Sub Form_Load()

cbonpm.AddItem “15100201”

cbonpm.AddItem “15100120”

cbonpm.AddItem “15100197”

cbonpm.AddItem “15100196”

cbonpm.AddItem “15100140”

cbonpm.AddItem “15100125”

cbonpm.AddItem “15100203”

cbonpm.AddItem “15100121”

cbonpm.AddItem “15100135”

cbonpm.AddItem “15100127”

cbonpm.AddItem “15100199”

cbonpm.AddItem “15201018”

cbonpm.AddItem “15100122”

cbonpm.AddItem “15100130”

cbonpm.AddItem “15100118”

cbonpm.AddItem “15100126”

cbonpm.AddItem “15100116”

cbonpm.AddItem “15100138”

cbonpm.AddItem “15100198”

cbonpm.AddItem “15100128”

cbonpm.AddItem “15100124”

cbonpm.AddItem “15100131”

cbonpm.AddItem “15100139”

cbonpm.AddItem “15100123”

cbonpm.AddItem “15100136”

cbonpm.AddItem “15100117”

cbonpm.AddItem “15100202”

cbonpm.AddItem “15100133”

cbonpm.AddItem “15100195”

cbonpm.AddItem “15100132”

cbonpm.AddItem “15100206”

cbonpm.AddItem “15100205”

cbonpm.AddItem “13100457”

cbonpm.AddItem “15100137”

cbonpm.AddItem “15100134”

cbonpm.AddItem “15100129”

cbonpm.AddItem “15100119”

 

End Sub

 

Private Sub Txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttugas.SetFocus

 

End If

End Sub

 

Private Sub Txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtuts.SetFocus

 

End If

End Sub

 

Private Sub Txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtuas.SetFocus

 

End If

End Sub

tugas pemprograman

Q HAFIIIID

Private Sub Check1_Click()

Label2.FontBold = Check1.Value

End Sub

 

Private Sub Check2_Click()

Label2.FontItalic = Check2.Value

End Sub

 

Private Sub Check3_Click()

Label2.FontUnderline = Check3.Value

End Sub

 

Private Sub Command1_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

Private Sub Option1_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub Option2_Click()

Label2.ForeColor = vbRed

End Sub

 

Private Sub Option3_Click()

Label2.ForeColor = vbGreen

End Sub