tugas database

Tugas1

anti1scren

Public Sub kosong()

txtnidn.SetFocus

txtnidn.Text = “”

Txtnama.Text = “”

Cbogol.Text = “”

Txtgapok.Text = “”

Txttun.Text = “”

Txtpjk.Text = “”

Txttot.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cbogol_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case Cbogol.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

Txttun.Text = tunjangan

Txtpjk.Text = pajak

Txttot.Text = total – pajak

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

Private Sub Form_Load()

Cbogol.AddItem “I”

Cbogol.AddItem “II”

Cbogol.AddItem “III”

Cbogol.AddItem “IV”

End Sub

 

Private Sub txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

End Sub

 

Tugas 2

anti2scren

 

Private Sub kosong()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtpro.Text = “”

Txtthn.Text = “”

Txtno.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim J As String

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

If J = “1” Then

Txtjur.Text = “Sistem Informasi”

ElseIf J = “2” Then

Txtjur.Text = “Teknik Informatika”

ElseIf J = “3” Then

Txtjur.Text = “Management Informatika”

ElseIf J = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

J = Mid(Txtnpm.Text, 4, 2)

If J = “01” Then

Txtpro.Text = “Strata Satu”

ElseIf J = “02” Then

Txtpro.Text = “Diploma Empat”

ElseIf J = “03” Then

Txtpro.Text = “Diploma Tiga”

ElseIf J = “04” Then

Txtpro.Text = “Diploma Dua”

End If

Txtthn.Text = “20” & Left(Txtnpm.Text, 2)

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

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command4_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtpro.Text = “”

Txtthn.Text = “”

Txtno.Text = “”

End Sub

 

Private Sub simpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

 

Tugas 3

anti3scren

 

Private Sub kosong()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtpro.Text = “”

Txtthn.Text = “”

Txtno.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim J As String

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

If J = “1” Then

Txtjur.Text = “Sistem Informasi”

Txtpro.Text = “Strata Satu”

ElseIf J = “2” Then

Txtjur.Text = “Teknik Informatika”

Txtpro.Text = “Diploma Empat”

ElseIf J = “3” Then

Txtjur.Text = “Management Informatika”

Txtpro.Text = “Diploma Tiga”

ElseIf J = “4” Then

Txtjur.Text = “Komputer Akuntansi”

Txtpro.Text = “Diploma Dua”

End If

Txtthn.Text = “20” & Left(Txtnpm.Text, 2)

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

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtpro.Text = “”

Txtthn.Text = “”

Txtno.Text = “”

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

 

Tugas 4

anti4Capture

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjual.Text = “”

Txtmerk.Text = “”

Txtharga.Text = “”

Txthp.Text = “”

Txtdis.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim diskon As String

Txthp.Text = Val(Txtjual * Txtharga)

Select Case Txthp.Text

Case Is > 140000000

diskon = Val(Txthp * 0.15)

Case Is > 135000000

diskon = Val(Txthp * 0.1)

Case Is > 130000000

diskon = Val(Txthp * 0.05)

Case Is > 125000000

diskon = Val(Txthp * 0.02)

End Select

Txtdis.Text = diskon

Txttotal.Text = Val(Txthp – Txtdis)

End Sub

 

Private Sub Cbokode_Click()

Dim J As String

J = Mid(Cbokode.Text, 7, 5)

If J = “MC965” Then

Txtmerk.Text = “Apple MacBook Air MC965”

Txtharga.Text = “12800000”

ElseIf J = “MC966” Then

Txtmerk.Text = “Apple MacBook Air MC966”

Txtharga.Text = “15800000”

ElseIf J = “MC968” Then

Txtmerk.Text = “Apple MacBook Air MC968”

Txtharga.Text = “9900000”

ElseIf J = “MC969” Then

Txtmerk.Text = “Apple MacBook Air MC969”

Txtharga.Text = “11900000”

ElseIf J = “MC700” Then

Txtmerk.Text = “Apple MacBook Pro MC700”

Txtharga.Text = “10800000”

ElseIf J = “MC721” Then

Txtmerk.Text = “Apple MacBook Pro MC721”

Txtharga.Text = “15900000”

ElseIf J = “MC723” Then

Txtmerk.Text = “Apple MacBook Pro MC723”

Txtharga.Text = “19300000”

ElseIf J = “MC724” Then

Txtmerk.Text = “Apple MacBook Pro MC724”

Txtharga.Text = “13700000”

ElseIf J = “MC311” Then

Txtmerk.Text = “Apple MacBook Pro MC311”

Txtharga.Text = “24200000”

ElseIf J = “MC313” Then

Txtmerk.Text = “Apple MacBook Pro MC313”

Txtharga.Text = “11900000”

ElseIf J = “MC314” Then

Txtmerk.Text = “Apple MacBook Pro MC314”

Txtharga.Text = “14700000”

ElseIf J = “MC318” Then

Txtmerk.Text = “Apple MacBook Pro MC318”

Txtharga.Text = “17600000”

ElseIf J = “MC322” Then

Txtmerk.Text = “Apple MacBook Pro MC322”

Txtharga.Text = “21300000”

End If

Txtjual.SetFocus

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Load()

Cbokode.AddItem “Aplle MC965 MacBook Air”

Cbokode.AddItem “Aplle MC966 MacBook Air”

Cbokode.AddItem “Aplle MC968 MacBook Air”

Cbokode.AddItem “Aplle MC969 MacBook Air”

Cbokode.AddItem “Aplle MC700 MacBook Pro”

Cbokode.AddItem “Aplle MC721 MacBook Pro”

Cbokode.AddItem “Aplle MC723 MacBook Pro”

Cbokode.AddItem “Aplle MC724 MacBook Pro”

Cbokode.AddItem “Aplle MC311 MacBook Pro”

Cbokode.AddItem “Aplle MC313 MacBook Pro”

Cbokode.AddItem “Aplle MC314 MacBook Pro”

Cbokode.AddItem “Aplle MC318 MacBook Pro”

Cbokode.AddItem “Aplle MC322 MacBook Pro”

End Sub

 

 

Tugas5

anti5

Private Sub Cmdlagi_Click()

Cbokd.SetFocus

Cbokd.Text = “”

Txtjns.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txthp.Text = “”

Txtdc.Text = “”

Txthb.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Txthp.Text = Val(Txths * Txtjj)

Dim diskon As String

Select Case Txthp.Text

Case Is > 30000000

diskon = Val(Txthp) * (15 / 100)

Case Is > 25000000

diskon = Val(Txthp) * (10 / 100)

Case Is > 20000000

diskon = Val(Txthp) * (5 / 100)

Case Is > 15000000

diskon = Val(Txthp) * (2 / 100)

End Select

Txtdc.Text = diskon

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

End Sub

 

Private Sub Cbokd_Click()

Dim J As String

J = Mid(Cbokd.Text, 1, 4)

If J = “P205” Then

Txtjns.Text = “Pentium II   500 Mega HZ”

Txths.Text = “1500000”

ElseIf J = “P308” Then

Txtjns.Text = “Pentium III   800 Mega HZ”

Txths.Text = “2100000”

ElseIf J = “P310” Then

Txtjns.Text = “Pentium III   1.0 Giga HZ”

Txths.Text = “3500000”

ElseIf J = “P415” Then

Txtjns.Text = “Pentium IV   1.5 Giga HZ”

Txths.Text = “4000000”

ElseIf J = “P417” Then

Txtjns.Text = “Pentium IV   1.7 Giga HZ”

Txths.Text = “4200000”

ElseIf J = “P419” Then

Txtjns.Text = “Pentium III   1.9 Giga HZ”

Txths.Text = “5500000”

End If

Txtjj.SetFocus

End Sub

 

Private Sub Comdclose_Click()

Form2.Show

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

Cbokd.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()

Cbokd.AddItem “P205”

Cbokd.AddItem “P308”

Cbokd.AddItem “P310”

Cbokd.AddItem “P415”

Cbokd.AddItem “P417”

Cbokd.AddItem “P419”

End Sub

 

Tugas 6

anti6Capture

 

Private Sub kosong()

Cbokd.SetFocus

Cbokd.Text = “”

Txtjb.Text = “”

Txtpg.Text = “”

Txtth.Text = “”

Txtpn.Text = “”

Txtha.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Cbokd.Text, 1, 1)

If b = “A” Then

Txtpn.Text = “Andi Offset Yogyakarta”

ElseIf b = “I” Then

Txtpn.Text = “Indah Surabaya”

ElseIf b = “S” Then

Txtpn.Text = “Salemba Empat”

ElseIf b = “E” Then

Txtpn.Text = “Elek Media Komputindo”

ElseIf b = “M” Then

Txtpn.Text = “Maxicom”

End If

b = Mid(Cbokd.Text, 3, 3)

If b = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

Txtha.Text = “75900”

Txtpg.Text = “Yati Nur OKtavia”

ElseIf b = “EDP” Then

Txtjb.Text = “Elektronik Data Processing”

Txtha.Text = “62000”

Txtpg.Text = “Imam Tarmizi”

ElseIf b = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtha.Text = “42000”

Txtpg.Text = “Valentina Mariana Adiwianti”

ElseIf b = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtha.Text = “53000”

Txtpg.Text = “Riyan Suhandi”

ElseIf b = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

Txtha.Text = “83000”

Txtpg.Text = “Sinta Umpu Singa”

End If

Txtth.Text = “20” & Right(Cbokd.Text, 2)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Load()

Cbokd.AddItem “A-SIM-01”

Cbokd.AddItem “I-EDP-02”

Cbokd.AddItem “S-MNJ-03”

Cbokd.AddItem “E-CDR-04”

Cbokd.AddItem “M-RPL-05”

End Sub

 

Tugas 7

anti7Capture

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

Txtkd.SetFocus

Txtkd.Text = “”

Txtha.Text = “”

Txtjs.Text = “”

Txtjam.Text = “”

Txtjum.Text = “”

Txttot.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim J As String

J = Mid(Txtkd.Text, 1, 3)

If J = “BIM” Then

Txtha.Text = “50000”

Txtjs.Text = “BIMA”

Txtjam.Text = “16.00”

ElseIf J = “EKO” Then

Txtha.Text = “35000”

Txtjs.Text = “EKONOMI”

Txtjam.Text = “19.00”

ElseIf J = “MUT” Then

Txtha.Text = “23000”

Txtjs.Text = “MUTIARA”

Txtjam.Text = “17.00”

ElseIf J = “SEN” Then

Txtha.Text = “15000”

Txtjs.Text = “SENJA”

Txtjam.Text = “20.00”

End If

Txtjum.SetFocus

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Txtjum_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttot.Text = Val(Txtha * Txtjum)

End If

End Sub

 

Tugas 8

anti8Capture

 

Private Sub kosong()

Textkode.SetFocus

Textkode.Text = “”

Textjb.Text = “”

Textpg.Text = “”

Texttt.Text = “”

Textpe.Text = “”

Textha.Text = “”

End Sub

 

Private Sub Cmdbaru_Click()

Data1.Recordset.AddNew

Textkode.SetFocus

End Sub

 

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Textkode.Text, 1, 3)

If b = “SIM” Or b = “sim” Then

Textjb.Text = “Sistem Informasi Manajemen”

Textpg.Text = “Fadiya Ulfa”

Textha.Text = “75900”

ElseIf b = “EDP” Or b = “edp” Then

Textjb.Text = “Elektronika Data Processig”

Textpg.Text = “Nurul Agustina”

Textha.Text = “62000”

ElseIf b = “MNJ” Or b = “mnj” Then

Textjb.Text = “Manajemen”

Textpg.Text = “Rian Hidayat”

Textha.Text = “42000”

ElseIf b = “CDR” Or b = “cdr” Then

Textjb.Text = “Corel Draw”

Textpg.Text = “Siti Nur Khotimah”

Textha.Text = “53000”

ElseIf b = “RPL” Or b = “rpl” Then

Textjb.Text = “Rekayasa Perangkat Lunak”

Textpg.Text = “Winda Erlianti”

Textha.Text = “83000”

End If

b = Mid(Textkode.Text, 8, 1)

If b = “A” Or b = “a” Then

Textpe.Text = “Andi Offset Yogyakarta”

ElseIf b = “I” Or b = “i” Then

Textpe.Text = “Indah Surabaya”

ElseIf b = “S” Or b = “s” Then

Textpe.Text = “Salemba Empat”

ElseIf b = “E” Or b = “e” Then

Textpe.Text = “Elek Media Komputindo”

ElseIf b = “M” Or b = “m” Then

Textpe.Text = “Maxicom”

End If

Texttt.Text = “20” & Mid(Textkode.Text, 5, 2)

End Sub

 

Private Sub Cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Tugas 9

ANTI9Capture

 

Private Sub kosong()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Textnik.Text, 5, 1)

If b = “A” Or b = “a” Then

Textgol.Text = “A”

Textjbt.Text = “Manajer”

Textgapok.Text = “4000000”

Texttun.Text = “1025000”

ElseIf b = “B” Or b = “b” Then

Textgol.Text = “B”

Textjbt.Text = “Kepala Seksi”

Textgapok.Text = “3500000”

Texttun.Text = “975000”

ElseIf b = “C” Or b = “c” Then

Textgol.Text = “C”

Textjbt.Text = “Staff”

Textgapok.Text = “3000000”

Texttun.Text = “925000”

End If

b = Mid(Textnik.Text, 7, 1)

If b = “S” Or b = “s” Then

Textkode.Text = “S”

Textsts.Text = “Single”

ElseIf b = “M” Or b = “m” Then

Textkode.Text = “M”

Textsts.Text = “Menikah”

ElseIf b = “J” Or b = “j” Then

Textkode.Text = “J”

Textsts.Text = “Janda”

ElseIf b = “D” Or b = “d” Then

Textkode.Text = “D”

Textsts.Text = “Duda”

End If

b = Right(Textnik.Text, 3)

If b = “KEU” Or b = “keu” Then

Textbgn.Text = “Accounting”

ElseIf b = “ADM” Or b = “adm” Then

Textbgn.Text = “Administrasi”

ElseIf b = “SDM” Or b = “sdm” Then

Textbgn.Text = “General Affair”

ElseIf b = “EDP” Or b = “edp” Then

Textbgn.Text = “IT Unit”

ElseIf b = “SPM” Or b = “spm” Then

Textbgn.Text = “Security”

End If

Textthn.Text = Left(Textnik.Text, 4)

Texttot.Text = Val(Textgapok) + Val(Texttun)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnik.SetFocus

End If

End Sub

 

 

Tugas 10

ANTI10Capture

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()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

Advertisements
Standard

tugas 9

IMG_20160103_215257

Private Sub kosong()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Textnik.Text, 5, 1)

If b = “A” Then

Textgol.Text = “A”

Textjbt.Text = “Manajer”

Textgapok.Text = “4000000”

Texttun.Text = “1025000”

ElseIf b = “B” Then

Textgol.Text = “B”

Textjbt.Text = “Kepala Seksi”

Textgapok.Text = “3500000”

Texttun.Text = “975000”

ElseIf b = “C” Then

Textgol.Text = “C”

Textjbt.Text = “Staff”

Textgapok.Text = “3000000”

Texttun.Text = “925000”

End If

b = Mid(Textnik.Text, 7, 1)

If b = “S” Then

Textkode.Text = “S”

Textsts.Text = “Single”

ElseIf b = “M” Then

Textkode.Text = “M”

Textsts.Text = “Menikah”

ElseIf b = “J” Then

Textkode.Text = “J”

Textsts.Text = “Janda”

ElseIf b = “D” Then

Textkode.Text = “D”

Textsts.Text = “Duda”

End If

b = Mid(Textnik.Text, 9, 3)

If b = “KEU” Then

Textbgn.Text = “Accounting”

ElseIf b = “ADM” Then

Textbgn.Text = “Administrasi”

ElseIf b = “SDM” Then

Textbgn.Text = “General Affair”

ElseIf b = “EDP” Then

Textbgn.Text = “IT Unit”

ElseIf b = “SPM” Then

Textbgn.Text = “Security”

End If

Textthn.Text = Left(Textnik.Text, 4)

Texttot.Text = Val(Textgapok) + Val(Texttun)

End Sub

 

Private Sub Form_Activate()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnik.SetFocus

End If

End Sub

Standard

tugas 8

IMG_20160103_215253

Private Sub kosong()

Textkode.SetFocus

Textkode.Text = “”

Textjb.Text = “”

Textpg.Text = “”

Texttt.Text = “”

Textpe.Text = “”

Textha.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Textkode.Text, 1, 3)

If b = “SIM” Then

Textjb.Text = “Sistem Informasi Manajemen”

Textpg.Text = “Fadiya Ulfa”

Textha.Text = “75900”

ElseIf b = “EDP” Then

Textjb.Text = “Elektronika Data Processig”

Textpg.Text = “Nurul Agustina”

Textha.Text = “62000”

ElseIf b = “MNJ” Then

Textjb.Text = “Manajemen”

Textpg.Text = “Rian Hidayat”

Textha.Text = “42000”

ElseIf b = “CDR” Then

Textjb.Text = “Corel Draw”

Textpg.Text = “Siti Nur Khotimah”

Textha.Text = “53000”

ElseIf b = “RPL” Then

Textjb.Text = “Rekayasa Perangkat Lunak”

Textpg.Text = “Winda Erlianti”

Textha.Text = “83000”

End If

b = Mid(Textkode.Text, 8, 1)

If b = “A” Then

Textpe.Text = “Andi Offset Yogyakarta”

ElseIf b = “I” Then

Textpe.Text = “Indah Surabaya”

ElseIf b = “S” Then

Textpe.Text = “Salemba Empat”

ElseIf b = “E” Then

Textpe.Text = “Elek Media Komputindo”

ElseIf b = “M” Then

Textpe.Text = “Maxicom”

End If

Texttt.Text = “20” & Mid(Textkode.Text, 5, 2)

End Sub

Standard

tugas 7

IMG_20160103_215249

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtkd.SetFocus

Txtkd.Text = “”

Txtha.Text = “”

Txtjs.Text = “”

Txtjam.Text = “”

Txtjum.Text = “”

Txttot.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim J As String

J = Mid(Txtkd.Text, 1, 3)

If J = “BIM” Then

Txtha.Text = “50000”

Txtjs.Text = “BIMA”

Txtjam.Text = “16.00”

ElseIf J = “EKO” Then

Txtha.Text = “35000”

Txtjs.Text = “EKONOMI”

Txtjam.Text = “19.00”

ElseIf J = “MUT” Then

Txtha.Text = “23000”

Txtjs.Text = “MUTIARA”

Txtjam.Text = “17.00”

ElseIf J = “SEN” Then

Txtha.Text = “15000”

Txtjs.Text = “SENJA”

Txtjam.Text = “20.00”

End If

Txtjum.SetFocus

End Sub

 

Private Sub Txtjum_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttot.Text = Val(Txtha * Txtjum)

End If

End Sub

Standard

tugas 6

 

IMG_20160103_215245

Private Sub kosong()

Cbokd.SetFocus

Cbokd.Text = “”

Txtjb.Text = “”

Txtpg.Text = “”

Txtth.Text = “”

Txtpn.Text = “”

Txtha.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Cbokd.Text, 1, 1)

If b = “A” Then

Txtpn.Text = “Andi Offset Yogyakarta”

ElseIf b = “I” Then

Txtpn.Text = “Indah Surabaya”

ElseIf b = “S” Then

Txtpn.Text = “Salemba Empat”

ElseIf b = “E” Then

Txtpn.Text = “Elek Media Komputindo”

ElseIf b = “M” Then

Txtpn.Text = “Maxicom”

End If

b = Mid(Cbokd.Text, 3, 3)

If b = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

Txtha.Text = “75900”

Txtpg.Text = “Yati Nur OKtavia”

ElseIf b = “EDP” Then

Txtjb.Text = “Elektronik Data Processing”

Txtha.Text = “62000”

Txtpg.Text = “Imam Tarmizi”

ElseIf b = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtha.Text = “42000”

Txtpg.Text = “Valentina Mariana Adiwianti”

ElseIf b = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtha.Text = “53000”

Txtpg.Text = “Riyan Suhandi”

ElseIf b = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

Txtha.Text = “83000”

Txtpg.Text = “Sinta Umpu Singa”

End If

Txtth.Text = “20” & Right(Cbokd.Text, 2)

End Sub

 

Private Sub Form_Load()

Cbokd.AddItem “A-SIM-01”

Cbokd.AddItem “I-EDP-02”

Cbokd.AddItem “S-MNJ-03”

Cbokd.AddItem “E-CDR-04”

Cbokd.AddItem “M-RPL-05”

End Sub

Standard

tugas 5

IMG_20160103_215240

Private Sub Cmdlagi_Click()

Cbokd.SetFocus

Cbokd.Text = “”

Txtjns.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txthp.Text = “”

Txtdc.Text = “”

Txthb.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Txthp.Text = Val(Txths * Txtjj)

Dim diskon As String

Select Case Txthp.Text

Case Is > 30000000

diskon = Val(Txthp * 0.15)

Case Is > 25000000

diskon = Val(Txthp * 0.1)

Case Is > 20000000

diskon = Val(Txthp * 0.05)

Case Is > 15000000

diskon = Val(Txthp * 0.02)

End Select

Txtdc.Text = diskon

Txthb.Text = Val(Txthp – Txtdc)

End Sub

 

Private Sub Cbokd_Click()

Dim J As String

J = Mid(Cbokd.Text, 1, 4)

If J = “P205” Then

Txtjns.Text = “Pentium II   500 Mega HZ”

Txths.Text = “1500000”

ElseIf J = “P308” Then

Txtjns.Text = “Pentium III   800 Mega HZ”

Txths.Text = “2100000”

ElseIf J = “P310” Then

Txtjns.Text = “Pentium III   1.0 Giga HZ”

Txths.Text = “3500000”

ElseIf J = “P415” Then

Txtjns.Text = “Pentium IV   1.5 Giga HZ”

Txths.Text = “4000000”

ElseIf J = “P417” Then

Txtjns.Text = “Pentium IV   1.7 Giga HZ”

Txths.Text = “4200000”

ElseIf J = “P419” Then

Txtjns.Text = “Pentium III   1.9 Giga HZ”

Txths.Text = “5500000”

End If

Txtjj.SetFocus

End Sub

 

Private Sub Comdclose_Click()

End

End Sub

 

Private Sub Form_Load()

Cbokd.AddItem “P205”

Cbokd.AddItem “P308”

Cbokd.AddItem “P310”

Cbokd.AddItem “P415”

Cbokd.AddItem “P417”

Cbokd.AddItem “P419”

End Sub

Standard