database

data1

Private Sub Cmdbatal_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub

Private Sub CMDKELUAR_Click()
Form2.Show
End Sub

Private Sub cmdlagi_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub

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

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

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

Private Sub Form_load()
cbogolongan.AddItem “I”
cbogolongan.AddItem “II”
cbogolongan.AddItem “III”
cbogolongan.AddItem “IV”
End Sub
Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case cbogolongan
Case “I”
gapok = 3500000
tunjangan = 350000
Case “II”
gapok = 2400000
tunjangan = 240000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 1000000
tunjangan = 100000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgapok = gapok
txttunjangan = tunjangan
txtpajak = pajak
txttotal = total – pajak
End Sub
Private Sub txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data2
Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub cmdkeluar_Click()
Form2.Show
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim jr As String
Dim ps As String
Dim A As String
A = Mid(Textnpm, 3, 1)
If A = 1 Then
jr = “sistem informasi”
ElseIf A = 2 Then
jr = “teknik informatika”
ElseIf A = 3 Then
jr = “menejemen informatika”
ElseIf A = 4 Then
jr = “komputer akuntansi”
End If
Textjur = jr

A = Mid(Textnpm, 4, 2)
If A = “01” Then
ps = “strata 1”
ElseIf A = “02” Then
ps = “diploma 4”
ElseIf A = “03” Then
ps = “diploma 3”
ElseIf A = “04” Then
ps = “diploma 2”
End If
Textps = ps
Texttm = “20” & Left(Textnpm, 2)
Textnu = Right(Textnpm, 3)

End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Textnama.SetFocus
End Sub

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

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

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data3

Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdkeluar_Click()
Form2.Show
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim A As String
Texttm = “20” & Left(Textnpm, 2)
A = Mid(Textnpm, 3, 3)
If A = “100” Then
Textjur = “sistem informasi”
Textps = “strata 1”
ElseIf A = “200” Then
Textjur = “manajemen informatika”
Textps = “diploma 3”
ElseIf A = “300” Then
Textjur = “teknik informatika”
Textps = “diploma 4”
ElseIf A = “400” Then
Textjur = “komputer akutansi”
Textps = “diploma 2”
End If
Textnu = Right(Textnpm, 3)
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Textnama.SetFocus
End Sub

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

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

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data4
Private Sub Cbocode_Click()
Dim merk, hs As String
Select Case Cbocode
Case “MC965”
merk = “Apple MacBook Air MC965”
hs = “12800000”
Case “MC966”
merk = “Apple MacBook Air MC966”
hs = “15800000”
Case “MC968”
merk = “Apple MacBook Air MC968”
hs = “9900000”
Case “MC969”
merk = “Apple MacBook Air MC969”
hs = “11900000”
Case “MC700”
merk = “Apple MacBook Pro MC700”
hs = “10800000”
Case “MC721”
merk = “Apple MacBook Pro MC721”
hs = “15900000”
Case “MC723”
merk = “Apple MacBook Pro MC723”
hs = “19300000”
Case “MC724”
merk = “Apple MacBook Pro MC724”
hs = “13700000”
Case “MC311”
merk = “Apple MacBook Pro MC311”
hs = “24200000”
Case “MC313”
merk = “Apple MacBook Pro MC313”
hs = “11900000”
Case “MC314”
merk = “Apple MacBook Pro MC314”
hs = “14700000”
Case “MC318”
merk = “Apple MacBook Pro MC318”
hs = “17600000”
Case “MC322”
merk = “Apple MacBook Pro MC322”
hs = “21300000”
End Select
Textmerk = merk
Texths = hs
Textjj.SetFocus
End Sub

Private Sub cmdhitung_Click()
Cbocode.SetFocus
Cbocode = “”
Textmerk = “”
Texths = “”
Textjj = “”
Texthp = “”
Textdis = “”
Texttotal = “”
End Sub

Private Sub cmdkeluar_Click()
Form2.Show
End Sub

Private Sub cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > 140000000 Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > 135000000 Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > 130000000 Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > 125000000 Then
Textdis = Val(Texthp) * 2 / 100
End If
Texttotal = Val(Texthp) – Val(txtdis)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Cbocode.SetFocus
End Sub

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

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

Private Sub Form_Load()
Cbocode.AddItem “MC965”
Cbocode.AddItem “MC966”
Cbocode.AddItem “MC968”
Cbocode.AddItem “MC969”
Cbocode.AddItem “MC700”
Cbocode.AddItem “MC721”
Cbocode.AddItem “MC723”
Cbocode.AddItem “MC724”
Cbocode.AddItem “MC311”
Cbocode.AddItem “MC313”
Cbocode.AddItem “MC314”
Cbocode.AddItem “MC318”
Cbocode.AddItem “MC966”
End Sub
Private Sub Textjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texthp.SetFocus
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data5
Private Sub Cbocode_Click()
Dim jenis, hs As String
Select Case Cbocode
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
Textjk = jenis
Texths = hs
Textjj.SetFocus
End Sub
Private Sub Cmdclose_Click()
Form2.Show
End Sub
Private Sub Cmdhl_Click()
Cbocode.SetFocus
Cbocode = “”
Textjk = “”
Texths = “”
Textjj = “”
Textdis = “”
Texthb = “”
End Sub

Private Sub Cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > “30000000” Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > “25000000” Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > “20000000” Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > “15000000” Then
Textdis = Val(Texthp) * 2 / 100
End If
Texthb = Val(Texthp) – Val(Textdis)
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Cbocode.SetFocus
End Sub

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

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

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

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data6
Private Sub Cbocode_Click()
Dim jenis, hs As String
Select Case Cbocode
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
Textjk = jenis
Texths = hs
Textjj.SetFocus
End Sub
Private Sub Cmdclose_Click()
Form2.Show
End Sub
Private Sub Cmdhl_Click()
Cbocode.SetFocus
Cbocode = “”
Textjk = “”
Texths = “”
Textjj = “”
Textdis = “”
Texthb = “”
End Sub

Private Sub Cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > “30000000” Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > “25000000” Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > “20000000” Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > “15000000” Then
Textdis = Val(Texthp) * 2 / 100
End If
Texthb = Val(Texthp) – Val(Textdis)
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Cbocode.SetFocus
End Sub

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

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

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

Private Sub Command1_Click()
Form1.Show
End Sub

Private Sub Command2_Click()
End
End Sub

data7.JPG

Private Sub Cmdkeluar_Click()
Form2.Show

End Sub

Private Sub cmdlagi_Click()
Textkt.SetFocus
Textkt = “”
Textht = “”
Textjk = “”
Textjb = “”
Textjt = “”
Texttp = “”
End Sub

Private Sub cmdproses_Click()
Dim S As String
S = Left(Textkt.Text, 3)
If S = “BIM” Or S = “bim” Then
Textjk.Text = “BIMA”
Textht.Text = “50000”
Textjb.Text = “16.00 WIB”
ElseIf S = “EKO” Or S = “eko” Then
Textjk.Text = “EKONOMI”
Textht.Text = “35000”
Textjb.Text = “19.00 WIB”
ElseIf S = “MUT” Or S = “mut” Then
Textjk.Text = “MUTIARA”
Textht.Text = “23000”
Textjb.Text = “17.00 WIB”
ElseIf S = “SEN” Or S = “sen” Then
Textjk.Text = “SENJA”
Textht.Text = “15000”
Textjb.Text = “20.00 WIB”
End If
Textjt.SetFocus
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Textkt.SetFocus
End Sub

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

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

Private Sub Textjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttp = Val(Textht) * Val(Textjt)
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

data8

Private Sub Cmdbatal_Click()
Txtkode.SetFocus
Txtkode.Text = “”
Txtjb.Text = “”
txtpeng.Text = “”
Txttp.Text = “”
Txtpen.Text = “”
Txtharga.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Form2.Show
End Sub

Private Sub cmdlagi_Click()
Txtkode.SetFocus
Txtkode.Text = “”
Txtjb.Text = “”
txtpeng.Text = “”
Txttp.Text = “”
Txtpen.Text = “”
Txtharga.Text = “”
End Sub
Private Sub Cmdproses_Click()
Dim S As String
S = Left(Txtkode, 3)
If S = “SIM” Then
Txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Fadiya Ulfa”
Txtharga.Text = “75900”
ElseIf S = “EDP” Then
Txtjb.Text = “Elektronik Data Processing”
txtpeng.Text = “Nurul Agustina”
Txtharga.Text = “62000”
ElseIf S = “MNJ” Then
Txtjb.Text = “Manajemen”
txtpeng.Text = “Rian Hidayat”
Txtharga.Text = “42000”
ElseIf S = “CDR” Then
Txtjb.Text = “Corel Draw”
txtpeng.Text = “Siti Nur Khotimah”
Txtharga.Text = “53000”
ElseIf S = “RPL” Then
Txtjb.Text = “Rekayasa Perangkat Lunak”
txtpeng.Text = “Winda Erlianti”
Txtharga.Text = “83000”
End If
Txttp.Text = “20” & Mid(Txtkode, 5, 2)
S = Right(Txtkode, 1)
If S = “A” Then
Txtpen.Text = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
Txtpen.Text = “Indah Surabaya”
ElseIf S = “S” Then
Txtpen.Text = “Salemba Empat”
ElseIf S = “E” Then
Txtpen.Text = “Elek Media Komputindo”
ElseIf S = “M” Then
Txtpen.Text = “Maxicom”
End If
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Txtkode.SetFocus
End Sub

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

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

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

TUGASSSS9

Private Sub Cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub cmdkeluar_Click()
Form2.Show
End Sub

Private Sub Cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub Cmdproses_Click()
Dim r As String
r = Mid(Textnik.Text, 5, 1)
If r = “A” Then
Textgol = “A”
Textjab.Text = “MANAGER”
Textgp.Text = “4000000”
Texttun.Text = “1025000”
ElseIf r = “B” Then
Textgol.Text = “B”
Textjab.Text = “Ka.SEKSI”
Textgp.Text = “3500000”
Texttun.Text = “975000”
ElseIf r = “C” Then
Textgol.Text = “C”
Textjab.Text = “STAFF”
Textgp.Text = “3000000”
Texttun.Text = “925000”
End If
r = Right(Textnik.Text, 3)
If r = “KEU” Then
Textbag.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
Textbag.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
Textbag.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
Textbag.Text = “IT UNIT”
ElseIf r = “SPM” Then
Textbag.Text = “SECURITY”
End If
r = Mid(Textnik.Text, 7, 1)
If r = “S” Then
ks = “S”
Stt = “SINGLE”
ElseIf r = “M” Then
ks = “M”
Stt = “MENIKAH”
ElseIf r = “J” Then
ks = “J”
Stt = “JANDA”
ElseIf r = “D” Then
ks = “D”
Stt = “DUDA”
End If
Textks.Text = ks
Textstt.Text = Stt
Textt.Text = Left(Textnik.Text, 4)
Texttg.Text = Val(Textgp.Text) + Val(Texttun.Text)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Textnama.SetFocus
End Sub

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

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

Private Sub Form_Activate()
Textnama.SetFocus
End Sub
Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnik.SetFocus
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

TUGAS10.JPG
Private Sub Cmdadd_Click()
Data1.Recordset.AddNew
Txtkode.SetFocus
End Sub

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

Private Sub Cmdhitung_Click()
Txtby.Text = Val(Txthb.Text) * Val(Txtjb.Text)
If Val(Txtjb.Text) > “5” Then
Txtpot.Text = Val(Txtby) * 0.02
Txttb.Text = Val(Txtby.Text) – (Txtpot.Text)
End If
End Sub

Private Sub Cmdkeluar_Click()
Form2.Show
End Sub

Private Sub Cmdproses_Click()
Dim H, nb, hb As String

H = Mid(Txtkode, 5, 2)
If H = “SP” Or H = “sp” Then
Txtnb.Text = “Spidol”
Txthb.Text = “9500”
ElseIf H = “BT” Or H = “bt” Then
Txtnb.Text = “Buku Tulis”
Txthb.Text = “12500”
ElseIf H = “TP” Or H = “tp” Then
Txtnb.Text = “Tip EX”
Txthb.Text = “3000”
ElseIf H = “PG” Or H = “pd” Then
Txtnb.Text = “Penggaris”
Txthb.Text = “2500”
ElseIf H = “PT” Or H = “pt” Then
Txtnb.Text = “Papan Tulis”
Txthb.Text = “5000”
End If
Txtjb.SetFocus
End Sub

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

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.Show
End Sub

 

TUGAS 9

7.PNG

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Textkt.SetFocus
Textkt = “”
Textht = “”
Textjk = “”
Textjb = “”
Textjt = “”
Texttp = “”
End Sub

Private Sub cmdproses_Click()
Dim S As String
S = Left(Textkt.Text, 3)
If S = “BIM” Then
Textjk.Text = “BIMA”
Textht.Text = “50000”
Textjb.Text = “16.00 WIB”
ElseIf S = “EKO” Then
Textjk.Text = “EKONOMI”
Textht.Text = “35000”
Textjb.Text = “19.00 WIB”
ElseIf S = “MUT” Then
Textjk.Text = “MUTIARA”
Textht.Text = “23000”
Textjb.Text = “17.00 WIB”
ElseIf S = “SEN” Then
Textjk.Text = “SENJA”
Textht.Text = “15000”
Textjb.Text = “20.00 WIB”
End If
Texttp.Text = Val(Textht.Text) * Val(Textjt.Text)
Textjt.SetFocus
End Sub
Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub Textjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttp = Val(Textht) * Val(Textjt)
End If
End Sub

8

Private Sub Cmdbatal_Click()
Txtkode.SetFocus
Txtkode.Text = “”
Txtjb.Text = “”
txtpeng.Text = “”
Txttp.Text = “”
Txtpen.Text = “”
Txtharga.Text = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Txtkode.SetFocus
Txtkode.Text = “”
Txtjb.Text = “”
txtpeng.Text = “”
Txttp.Text = “”
Txtpen.Text = “”
Txtharga.Text = “”
End Sub
Private Sub Cmdproses_Click()
Dim S As String
Txttp.Text = “20” & Mid(Txtkode, 5, 2)
S = Left(Txtkode, 3)
If S = “SIM” Then
Txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Fadiya Ulfa”
Txtharga.Text = “75900”
ElseIf S = “EDP” Then
Txtjb.Text = “Elektronik Data Processing”
txtpeng.Text = “Nurul Agustina”
Txtharga.Text = “62000”
ElseIf S = “MNJ” Then
Txtjb.Text = “Manajemen”
txtpeng.Text = “Rian Hidayat”
Txtharga.Text = “42000”
ElseIf S = “CDR” Then
Txtjb.Text = “Corel Draw”
txtpeng.Text = “Siti Nur Khotimah”
Txtharga.Text = “53000”
ElseIf S = “RPL” Then
Txtjb.Text = “Rekayasa Perangkat Lunak”
txtpeng.Text = “Winda Erlianti”
Txtharga.Text = “83000”
End If
S = Right(Txtkode, 1)
If S = “A” Then
Txtpen.Text = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
Txtpen.Text = “Indah Surabaya”
ElseIf S = “S” Then
Txtpen.Text = “Salemba Empat”
ElseIf S = “E” Then
Txtpen.Text = “Elek Media Komputindo”
ElseIf S = “M” Then
Txtpen.Text = “Maxicom”
End If
End Sub

9.PNG

Private Sub Cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub Cmdproses_Click()
Dim r As String
r = Mid(Textnik.Text, 5, 1)
If r = “A” Then
Textgol = “A”
Textjab.Text = “MANAGER”
Textgp.Text = “4000000”
Texttun.Text = “1025000”
ElseIf r = “B” Then
Textgol.Text = “B”
Textjab.Text = “Ka.SEKSI”
Textgp.Text = “3500000”
Texttun.Text = “975000”
ElseIf r = “C” Then
Textgol.Text = “C”
Textjab.Text = “STAFF”
Textgp.Text = “3000000”
Texttun.Text = “925000”
End If
r = Right(Textnik.Text, 3)
If r = “KEU” Then
Textbag.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
Textbag.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
Textbag.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
Textbag.Text = “IT UNIT”
ElseIf r = “SPM” Then
Textbag.Text = “SECURITY”
End If
r = Mid(Textnik.Text, 7, 1)
If r = “S” Then
ks = “S”
Stt = “SINGLE”
ElseIf r = “M” Then
ks = “M”
Stt = “MENIKAH”
ElseIf r = “J” Then
ks = “J”
Stt = “JANDA”
ElseIf r = “D” Then
ks = “D”
Stt = “DUDA”
End If
Textks.Text = ks
Textstt.Text = Stt
Textt.Text = Left(Textnik.Text, 4)
Texttg.Text = Val(Textgp.Text) + Val(Texttun.Text)
End Sub
Private Sub Form_Activate()
Textnama.SetFocus
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnik.SetFocus
End If
End Sub

TUGAS 9

2
Private Sub cmdbatal_Click()
kosong
End Sub

Private Sub cmdlagi_Click()
kosong
End Sub

Private Sub Cmdproses_Click()
Dim jr As String
Dim ps As String
Dim A As String
A = Mid(Textnpm, 3, 1)
If A = 1 Then
jr = “sistem informasi”
ElseIf A = 2 Then
jr = “teknik informatika”
ElseIf A = 3 Then
jr = “menejemen informatika”
ElseIf A = 4 Then
jr = “komputer akuntansi”
End If
Textjur = jr

A = Mid(Textnpm, 4, 2)
If A = “01” Then
ps = “strata 1”
ElseIf A = “02” Then
ps = “diploma 4”
ElseIf A = “03” Then
ps = “diploma 3”
ElseIf A = “04” Then
ps = “diploma 2”
End If
Textps = ps
Texttm = “20” & Left(Textnpm, 2)
Textnu = Right(Textnpm, 3)

End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

3

Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim A As String
Texttm = “20” & Left(Textnpm, 2)
A = Mid(Textnpm, 3, 3)
If A = “100” Then
Textjur = “sistem informasi”
Textps = “strata 1”
ElseIf A = “200” Then
Textjur = “manajemen informatika”
Textps = “diploma 3”
End If
Textnu = Right(Textnpm, 3)
End Sub

Private Sub Command4_Click()
End
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

4
Private Sub Cbocode_Click()
Dim merk, hs As String
Select Case Cbocode
Case “MC965”
merk = “Apple MacBook Air MC965”
hs = “12800000”
Case ” MC966″
merk = “Apple MacBook Air MC966”
hs = “15800000”
Case ” MC968″
merk = “Apple MacBook Air MC968”
hs = “9900000”
Case ” MC969″
merk = “Apple MacBook Air MC969”
hs = “11900000”
Case “MC700”
merk = “Apple MacBook Pro MC700”
hs = “10800000”
Case “MC721”
merk = “Apple MacBook Pro MC721”
hs = “15900000”
Case “MC723”
merk = “Apple MacBook Pro MC723”
hs = “19300000”
Case “MC724”
merk = “Apple MacBook Pro MC724”
hs = “13700000”
Case “MC311”
merk = “Apple MacBook Pro MC311”
hs = “24200000”
Case “MC313”
merk = “Apple MacBook Pro MC313”
hs = “11900000”
Case “MC314”
merk = “Apple MacBook Pro MC314”
hs = “14700000”
Case “MC318”
merk = “Apple MacBook Pro MC318”
hs = “17600000”
Case “MC322”
merk = “Apple MacBook Pro MC322”
hs = “21300000”
Case ” MC965″
merk = “Apple MacBook Air MC965”
hs = “12800000”
Case “MC966 ”
merk = “Apple MacBook Air MC966”
hs = “15800000 ”

End Select
Textmerk = merk
Texths = hs
Textjj.SetFocus
End Sub

Private Sub cmdhitung_Click()
Cbocode.SetFocus
Cbocode = “”
Textmerk = “”
Texths = “”
Textjj = “”
Texthp = “”
Textdis = “”
Texttotal = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > 140000000 Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > 135000000 Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > 130000000 Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > 125000000 Then
Textdis = Val(Texthp) * 2 / 100
End If
Texttotal = Val(Texthp) – Val(txtdis)
End Sub

Private Sub Form_Load()
Cbocode.AddItem “MC965”
Cbocode.AddItem “MC966”
Cbocode.AddItem “MC968”
Cbocode.AddItem “MC969”
Cbocode.AddItem “MC700”
Cbocode.AddItem “MC721”
Cbocode.AddItem “MC723”
Cbocode.AddItem “MC724”
Cbocode.AddItem “MC311”
Cbocode.AddItem “MC313”
Cbocode.AddItem “MC314”
Cbocode.AddItem “MC318”
Cbocode.AddItem “MC322”
End Sub
Private Sub Textjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texthp.SetFocus
End If
End Sub

5
Private Sub Cbocode_Click()
Dim jenis, hs As String
Select Case Cbocode
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
Textjk = jenis
Texths = hs
Textjj.SetFocus
End Sub
Private Sub Cmdclose_Click()
End
End Sub
Private Sub Cmdhl_Click()
Cbocode.SetFocus
Cbocode = “”
Textjk = “”
Texths = “”
Textjj = “”
Textdis = “”
Texthb = “”
End Sub

Private Sub Cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > “30000000” Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > “25000000” Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > “20000000” Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > “15000000” Then
Textdis = Val(Texthp) * 2 / 100
End If
Texthb = Val(Texthp) – Val(Textdis)
End Sub

Private Sub Form_Activate()
Cbocode.SetFocus
Cbocode = “”
Textjk = “”
Texths = “”
Textjj = “”
Textdis = “”
Texthb = “”
End Sub

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

6.PNG
Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
kosong
End Sub

Private Sub cmdproses_Click()
Dim judul, pengarang, tahun, penerbit, harga As String
Select Case Cmbcode
Case “A-SIM-01”
judul = “SistemInformasiManajemen”
pengarang = “YatiNurOktavia”
tahun = “2001”
penerbit = “Andi Offset Yogyakarta”
harga = “75900”
Case “I-EDP-02”
judul = “ElektronikData Processing”
pengarang = “Imam Tarmizi”
tahun = “2002”
penerbit = “Indah Surabaya”
harga = “62000”
Case “S-MNJ-03”
judul = “Manajemen”
pengarang = “Valentina Mariana Adiwianti”
tahun = “2003”
penerbit = “SalembaEmpat”
harga = “42000”
Case “E-CDR-04”
judul = “Corel Draw”
pengarang = “RiyanSuhandi”
tahun = “2004”
penerbit = “Elek Media Komputindo”
harga = “53000”
Case “M-RPL-05”
judul = “RekayasaPerangkatLunak”
pengarang = “SintaUmpuSinga”
tahun = “2005”
penerbit = “Maxicom”
harga = “83000”
End Select
Textjb = judul
Textpeng = pengarang
Texttt = tahun
Textpen = penerbit
Textharga = harga
End Sub

Private Sub Cndbatal_Click()
kosong
End Sub

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

 

TUGAS 9

1

Private Sub Cmdbatal_Click()
kosong
End Sub
Private Sub cmdlagi_Click()
kosong
End Sub

Private Sub Form_load()
cbogolongan.AddItem “I”
cbogolongan.AddItem “II”
cbogolongan.AddItem “III”
cbogolongan.AddItem “IV”
End Sub
Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case cbogolongan
Case “I”
gapok = 3500000
tunjangan = 350000
Case “II”
gapok = 2400000
tunjangan = 240000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 1000000
tunjangan = 100000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgapok = gapok
txttunjangan = tunjangan
txtpajak = pajak
txttotal = total – pajak
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Public Sub kosong()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub
Private Sub txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

pertemuan 2

DERU3

Private Sub Form_Load()
cbonmp.AddItem “15100107”
cbonmp.AddItem “15100052”
cbonmp.AddItem “15100054”
cbonmp.AddItem “15100056”
cbonmp.AddItem “15100063”
cbonmp.AddItem “15100081”
cbonmp.AddItem “15100046”
cbonmp.AddItem “15100043”
cbonmp.AddItem “15100217”
cbonmp.AddItem “15100053”
cbonmp.AddItem “15100058”
cbonmp.AddItem “15100073”
cbonmp.AddItem “15100082”
cbonmp.AddItem “15100045”
cbonmp.AddItem “15100076”
cbonmp.AddItem “15100057”
cbonmp.AddItem “15100044”
cbonmp.AddItem “15100067”
cbonmp.AddItem “15100066”
cbonmp.AddItem “15100047”
cbonmp.AddItem “15100048”
cbonmp.AddItem “15100050”
cbonmp.AddItem “15100051”
cbonmp.AddItem “15100074”
cbonmp.AddItem “15100062”
cbonmp.AddItem “15100070”
cbonmp.AddItem “15100071”
cbonmp.AddItem “15100080”
cbonmp.AddItem “15100068”
cbonmp.AddItem “15100064”
cbonmp.AddItem “15100079”
cbonmp.AddItem “15100061”
cbonmp.AddItem “15100059”
cbonmp.AddItem “15100072”
cbonmp.AddItem “15100069”
cbonmp.AddItem “15100055”
cbonmp.AddItem “15100075”
End Sub
Private Sub cbonmp_Click()
Dim nama, jurusan, HM As String

Select Case cbonmp.Text
Case “15100170”
nama = “Adi Kiswanto”
jurusan = “AKUTANSI UMUM”
Case “15100052”
nama = “Aditya Wibowo”
jurusan = “AGAMA ISLAM”
Case “1510054”
nama = “Agung Setiawan”
jurusan = “AGAMA HINDU”
Case “15100056”
nama = “Alfina Damayanti”
jurusan = “BIDAN”
Case “15100063”
nama = “Anti Susanti”
jurusan = “SISTEM INFORMASI”
Case “15100081”
nama = “Antia”
jurusan = “FARMASI”
Case “15100046”
nama = “Bayu Sanjaya”
jurusan = “PERAWAT”
Case “15100043”
nama = “Beni Rismawan”
jurusan = “BIDAN”
Case “151000217”
nama = “Catur Puji Pamungkas”
jurusan = “PRAMUGARI”
Case “15100053”
nama = “David Budianto”
jurusan = “DOKTER HEWAN”
Case “15100058”
nama = “Deru Hendrawan”
jurusan = “EKONOMI”
Case “15100073”
nama = “Elma Sintia”
jurusan = “DOKTER KULIT”
Case “15100082”
nama = “Eni Sundari”
jurusan = “BAHASA INGGRIS”
Case “15100045”
nama = “Gelbet Alexander”
jurusan = “HUKUM”
Case “15100076”
nama = “Gita Kusuma Wardani”
jurusan = “POLWAN”
Case “15100057”
nama = “Hafid Banu Rahman”
jurusan = “DOKTER KLAMIN”
Case “15100044”
nama = “Irfan Nur Fadulloh”
jurusan = “DESAINER”
Case “15100067”
nama = “Lailaturohmah”
jurusan = “AKUTANSI”
Case “15100066”
nama = “Lela Komalasari”
jurusan = “HUKUM”
Case “15100047”
nama = “M Mandala Sakti”
jurusan = “BAHASA KOREA”
Case “15100048”
nama = “M Zainul Mutaqin”
jurusan = “AGAMA ISLAM”
Case “15100050”
nama = “Marikun”
jurusan = “DOKTER KANDUNGAN”
Case “15100051”
nama = “Marsiyanto”
jurusan = “Biologi”
Case “15100074”
nama = “Muallamah”
jurusan = “PERAWAT”
Case “15100062”
nama = “Nabila Ghassani Karlus”
jurusan = “SISTEM INFORMASI”
Case “15100070”
nama = “Nila Restiana”
jurusan = “FARMASI”
Case “15100071”
nama = ” Nita Maylinda”
jurusan = “MULTIMEDIA”
Case “15100080”
nama = “NOFIYANTI”
jurusan = “Akutansi”
Case “15100068”
nama = “OKTA MAHENDRA”
jurusan = “Sistem Informasi”
Case “15100064”
nama = “PANCA LARASAFITRI”
jurusan = “Keperawatan”
Case “15100079”
nama = “RISKA DIANA”
jurusan = “Teknik informatika”
Case “15100061”
nama = “RISWAN EFENDI”
jurusan = “AGAMA KRISTEN”
Case “15100059”
nama = “RIYAN ALFARIZI”
jurusan = “BIDAN”
Case “15100072”
nama = “SUSANTI”
jurusan = “Bahasa Indonesia”
Case “15100069”
nama = “TRI AYU SEPTIANA”
jurusan = “Ekonomi”
Case “15100055”
nama = “VIVI NASIHATUN HIKMAH”
jurusan = “Bahasa Inggris”
Case “15100075”
nama = “WAHYUZA FRISTA DEA”
jurusan = “Sistem Informasi”
End Select
Textnama.Text = nama
TextJurusan.Text = jurusan
Textquis.SetFocus
End Sub

DERU4

Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm.Text = “”
Textnama.Text = “”
TextJurusan.Text = “”
Textquis.Text = “”
Texttugas = “”
Textuts.Text = “”
Textuas.Text = “”
Textna.Text = “”
TextHM.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(Textquis.Text)
TUGAS = Val(Texttugas.Text)
UTS = Val(Textuts.Text)
UAS = Val(Textuas.Text)
NA = Val(QUIS + TUGAS + UTS + UAS) / 4
Textna.Text = NA
Select Case Textna.Text
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
Text1hm.Text = HM
End Sub

Private Sub Textquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttugas.SetFocus
End If
End Sub

Private Sub Texttugas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textuts.SetFocus
End If
End Sub

Private Sub Textuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textuas.SetFocus
End If
End Sub

pertemuan 2

DEEERRUU
Private Sub chkBold_Click()
‘Membuat teks Tebal
If chkBold.Value = 1 Then
lblteks.FontBold = True
Else
lblteks.FontBold = False
End If
End Sub

Private Sub chkItalic_Click()
‘Membuat teks miring
If chkItalic.Value = 1 Then
lblteks.FontItalic = True
Else
lblteks.FontItalic = False
End If
End Sub

Private Sub chkStrikeout_Click()
‘Membuat teks garis tengah
If chkStrikeout.Value = 1 Then
lblteks.FontStrikeout = True
Else
lblteks.FontStrikeout = False
End If
End Sub

Private Sub chkUnderline_Click()
‘Membuat teks garis bawah
If chkUnderline.Value = 1 Then
lblteks.FontUnderline = True
Else
lblteks.FontUnderline = False
End If
End Sub
Private Sub optBlue_Click()
‘Membuat teks bewarna biru
lblteks.ForeColor = vbBlue
End Sub

Private Sub optGreen_Click()
‘Membuat teks bewarna hijau
lblteks.ForeColor = vbGreen
End Sub

Private Sub optRed_Click()
‘Membuat teks bewarna merah
lblteks.ForeColor = vbRed
End Sub

Private Sub optYellow_Click()
‘Membuat teks bewarna kuning
lblteks.ForeColor = vbYellow
End Sub

DERU2

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check2.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

click

dd

Private Sub cmdproses_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

Private Sub cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End If
End Sub

proses

dd.JPG

Private Sub cmdproses_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

Private Sub cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Form_Load()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

click

der

Private Sub CMD_Click()
End
End Sub

Private Sub cmdhitung_Click()
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End Sub

Private Sub Cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Textha.SetFocus
Textha = “”
Textdis = “”
Textak = “”
End Sub

Private Sub Textha_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End If

End Sub

proses

der
Private Sub cmdhitung_Click()
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End Sub

Private Sub Cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Textha.SetFocus
Textha = “”
Textdis = “”
Textak = “”
End Sub