TUGAS 10

TOKO SAL.png

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

 

 

Iklan

TUGAS 9

BUKU PROSES.png

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtkode.SetFocus

txtkode.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

txttahun.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

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

 

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

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

TUGAS 8

PT PULANG

Private Sub cmdbatal_Click()

txtmnk.SetFocus

txtmnk.Text = “”

txtmn.Text = “”

txtgol.Text = “”

txtks.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtmnk.SetFocus

txtmnk.Text = “”

txtmn.Text = “”

txtgol.Text = “”

txtks.Text = “”

txtstat.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim r As String

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

If r = “A” Then

txtgol = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “4000000”

txttunjangan.Text = “1025000”

ElseIf r = “B” Then

txtgol.Text = “B”

txtjabatan.Text = “Ka.SEKSI”

txtgapok.Text = “3500000”

txttunjangan.Text = “975000”

ElseIf r = “C” Then

txtgol.Text = “C”

txtjabatan.Text = “STAFF”

txtgapok.Text = “3000000”

txttunjangan.Text = “925000”

End If

r = Right(txtmn.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(txtmn.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

txtks.Text = kode

txtstat.Text = Status

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

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

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

txtmnk.SetFocus

End Sub

 

 

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

TUGAS 7

TIKET KERETA.png

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

Private Sub cmdlagi_Click()

txtkode.SetFocus

txtkode = “”

txtht = “”

txtjenis = “”

txtjb = “”

txtjumlah = “”

txttotal = “”

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

S = Left(txtkode.Text, 3)

If S = “BIM” Then

txtjenis.Text = “BIMA”

txtht.Text = “50000”

txtjb.Text = “16.00 WIB”

ElseIf S = “EKO” Then

txtjenis.Text = “EKONOMI”

txtht.Text = “35000”

txtjb.Text = “19.00 WIB”

ElseIf S = “MUT” Then

txtjenis.Text = “MUTIARA”

txtht.Text = “23000”

txtjb.Text = “17.00 WIB”

ElseIf S = “SEN” Then

txtjenis.Text = “SENJA”

txtht.Text = “15000”

txtjb.Text = “20.00 WIB”

End If

txttotal.Text = Val(txtht.Text) * Val(txtjumlah.Text)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

txtkode.SetFocus

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

txtkode.SetFocus

End Sub

 

 

 

Private Sub txtjumlah_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttotal.Text = Val(txtht.Text) * Val(txtjumlah.Text)

End If

End Sub

 

Private Sub txtkode_KeyPress(KeyAscii As Integer)

Dim S As String

S = Left(txtkode.Text, 3)

If S = “BIM” Then

txtjenis.Text = “BIMA”

txtht.Text = “50000”

txtjb.Text = “16.00 WIB”

ElseIf S = “EKO” Then

txtjenis.Text = “EKONOMI”

txtht.Text = “35000”

txtjb.Text = “19.00 WIB”

ElseIf S = “MUT” Then

txtjenis.Text = “MUTIARA”

txtht.Text = “23000”

txtjb.Text = “17.00 WIB”

ElseIf S = “SEN” Then

txtjenis.Text = “SENJA”

txtht.Text = “15000”

txtjb.Text = “20.00 WIB”

End If

If KeyAscii = 13 Then

txtjumlah.SetFocus

End If

End Sub

TUGAS 6

DATA BUKU COMBO.png

Private Sub cmdbatal_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub Command4_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

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

 

 

TUGAS 5

 

PENJUALAN KOMPUTER.png

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

cbokode.SetFocus

cbokode = “”

txtjk = “”

txths = “”

txtjj = “”

txthp = “”

txtdis = “”

txthb = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdproses_Click()

txthp = Val(txtjj) * Val(txths)

If Val(txthp) > “30000000” Then

txtdis = Val(txthp) * 15 / 100

ElseIf Val(txthp) > “25000000” Then

txtdis = Val(txthp) * 10 / 100

ElseIf Val(txthp) > “20000000” Then

txtdis = Val(txthp) * 5 / 100

ElseIf Val(txthp) > “15000000” Then

txtdis = Val(txthp) * 2 / 100

End If

txthb = Val(txthp) – Val(txtdis)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

cbokode.SetFocus

cbokode = “”

txtjk = “”

txths = “”

txtjj = “”

txtdis = “”

txthb = “”

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

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

TUGAS 4

PENJUALAN LAPTOP APPLE.png

Private Sub Cbokode_Click()

Dim mt, hs, TB As Integer

Select Case cbokode.Text

Case “MC965”

mt = “Apple MacBook Air MC965”

hs = “12800000”

Case “MC966”

mt = “Apple MacBook Air MC966”

hs = “15800000”

Case “MC968”

mt = “Apple MacBook Air MC968”

hs = “9900000”

Case “MC969”

mt = “Apple MacBook Air MC969”

hs = “11900000”

Case “MC700”

mt = “Apple MacBook Pro MC700”

hs = “10800000”

Case “MC721”

mt = “Apple MacBook Pro MC721”

hs = “15900000”

Case “MC723”

mt = “Apple MacBook Pro MC723”

hs = “19300000”

Case “MC724”

mt = “Apple MacBook Pro MC724”

hs = “13700000”

Case “MC311”

mt = “Apple MacBook Pro MC311”

hs = “24200000”

Case “MC313”

mt = “Apple MacBook Pro MC313”

hs = “11900000”

Case “MC314”

mt = “Apple MacBook Pro MC314”

hs = “14700000”

Case “MC318”

mt = “Apple MacBook Pro MC318”

hs = “17600000”

Case “MC322”

mt = “Apple MacBook Pro MC322”

hs = “21300000”

Case “MC965”

mt = “Apple MacBook Air MC965”

hs = “12800000”

Case “MC966”

mt = “Apple MacBook Air MC966”

hs = “15800000”

End Select

txtmerk.Text = mt

txths.Text = hs

txtjj.SetFocus

End Sub

 

Private Sub cmdhitung_Click()

cbokode.SetFocus

cbokode.Text = “”

txtmerk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub command1_Click()

End

End Sub

 

Private Sub command2_Click()

Form1.show

End Sub

 

 

 

Private Sub Cmdproses_Click()

txthp.Text = Val(txths) * Val(txtjj)

Select Case txthp.Text

Case Is > 140000000

txtdiskon.Text = Val(txthp) * 0.15

Case Is > 135000000

txtdiskon.Text = Val(txthp) * 0.1

Case Is > 130000000

txtdiskon.Text = Val(txthp) * 0.05

Case Is > 125000000

txtdiskon.Text = Val(txthp) * 0.02

End Select

txttotal.Text = Val(txthp) – Val(txtdis)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “MC965”

cbokode.AddItem “MC966”

cbokode.AddItem “MC968”

cbokode.AddItem “MC969”

cbokode.AddItem “MC700”

cbokode.AddItem “MC721”

cbokode.AddItem “MC723”

cbokode.AddItem “MC724”

cbokode.AddItem “MC311”

cbokode.AddItem “MC313”

cbokode.AddItem “MC314”

cbokode.AddItem “MC318”

cbokode.AddItem “MC322”

cbokode.AddItem “MC965”

cbokode.AddItem “MC966”

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

txtdiskon.Text = Val(txthp) * 0.15

Case Is > 135000000

txtdiskon.Text = Val(txthp) * 0.1

Case Is > 130000000

txtdiskon.Text = Val(txthp) * 0.05

Case Is > 125000000

txtdiskon.Text = Val(txthp) * 0.02

End Select

txttotal.Text = Val(txthp) – Val(txtdis)

End If

End Sub