VISUAL BASIC

TUGAS13

Private Sub cbokode_Click()

Dim mt, hs As String

Select Case cbokode

Case “ASUS A43SA”

mt = “ASUS A43SA-VXO90D”

hs = “5500000”

Case “ASUS A43SD”

mt = “ASUS A43SD-VXO532D”

hs = “4500000”

Case “ASUS A435J”

mt = “ASUS A435J-VX792J”

hs = “4900000”

Case “ASUS N43L”

mt = “ASUS N43L-VX264D”

hs = “4300000”

Case “APPLE MD311”

mt = “APPLE MACBOOCK PRO MD311”

hs = “19300000”

Case “APPLE MD313”

mt = “APPLE MACBOOCK PRO MD313”

hs = “24200000”

Case “APPLE MD314”

mt = “APPLE MACBOOCK PRO MD314”

hs = “11900000”

Case “APPLE MD322”

mt = “APPLE MACKBOOCK PRO MD322 ”

hs = “14700000”

Case “APPLE MC95”

mt = “APPLE MACBOOK AIR MC965”

hs = “21300000”

End Select

txtmerk.Text = mt

txtharga.Text = hs

txtjumlah.SetFocus

 

End Sub

 

Private Sub Command1_Click()

txthargapen.Text = Val(txtharga.Text) * Val(txtjumlah.Text)

Select Case txthargapen.Text

Case Is > 14000000

txtdis.Text = Val(txthargapen.Text) * 15 / 100

Case Is > 135000000

txtdis.Text = Val(txthargapen.Text) * 10 / 100

Case Is > 130000000

txtdis.Text = Val(txthargapen.Text) * 5 / 100

Case Is > 125000000

txtdis.Text = Val(txthargapen.Text) * 2 / 100

End Select

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

 

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

 

End Sub

 

Private Sub Command3_Click()

cbokode.SetFocus

cbokode = “”

txtmerk = “”

txtharga = “”

txtjumlah = “”

txthargapen = “”

txtdis = “”

txttotal = “”

 

End Sub

 

Private Sub Command4_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command5_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Command6_Click()

Form2.Show

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “ASUS A43SA”

cbokode.AddItem “ASUS A43SD”

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

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

Iklan

VISUAL BASIC

TUGAS12

 

 

Private Sub Cmdbatal_Click()

Textkode.SetFocus

Textkode.Text = “”

Textjudul.Text = “”

Textpengarang.Text = “”

Texttahun.Text = “”

Textpenerbit.Text = “”

Textharga.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

Textkode.SetFocus

Textkode.Text = “”

Textjudul.Text = “”

Textpengarang.Text = “”

Texttahun.Text = “”

Textpenerbit.Text = “”

Textharga.Text = “”

End Sub

 

 

Private Sub Cmdproses_Click()

Dim M As String

M = Left(Textkode, 3)

If M = “SIM” Then

Textjudul.Text = “Sistem Informasi Manajemen”

Textpengarang.Text = “Fadiya Ulfa”

Textharga.Text = “75900”

ElseIf M = “EDP” Then

Textjudul.Text = “Elektronik Data Processing”

Textpengarang.Text = “Nurul Agustina”

Textharga.Text = “62000”

ElseIf M = “MNJ” Then

Textjudul.Text = “Manajemen”

Textpengarang.Text = “Rian Hidayat”

Textharga.Text = “42000”

ElseIf M = “CDR” Then

Textjudul.Text = “Corel Draw”

Textpengarang.Text = “Siti Nur Khotimah”

Textharga.Text = “53000”

ElseIf M = “RPL” Then

Textjudul.Text = “Rekayasa Perangkat Lunak”

Textpengarang.Text = “Winda Erlianti”

Textharga.Text = “83000”

End If

M = Right(Textkode, 1)

If M = “A” Then

Textpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf M = “I” Then

Textpenerbit.Text = “Indah Surabaya”

ElseIf M = “S” Then

Textpenerbit.Text = “Salemba Empat”

ElseIf M = “E” Then

Textpenerbit.Text = “Elek Media Komputindo”

ElseIf M = “M” Then

Textpenerbit.Text = “Maxicom”

End If

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

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

 

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

VISUAL BASIC

tugas11

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

Cbokode.SetFocus

Textcode = “”

Textjudul = “”

Textpengarang = “”

Texttahun = “”

Textpenerbit = “”

Textharga = “”

End Sub

 

 

Private Sub Cmdproses_Click()

Dim judul, pengarang, tahun, penerbit, harga As String

 

q = Mid(Cbokode, 3, 3)

If q = “SIM” Then

judul = “Sistem informasi manajemen”

pengarang = “YatiNurOktavia”

harga = “75900”

ElseIf q = “EDP” Then

judul = “Elektronik Data Processing”

pengarang = “Imam Tarmizi”

harga = “62000”

ElseIf q = “MNJ” Then

judul = “Manajemen”

pengarang = “Valentina Mariana Adiwianti”

harga = “42000”

ElseIf q = “CDR” Then

judul = “Corel Draw”

pengarang = “Riyan Suhandi”

harga = “53000”

ElseIf q = “RPL” Then

judul = “RekayasaPerangkatLunak”

pengarang = “SintaUmpuSinga”

harga = “83000”

End If

Textjudul.Text = judul

Textpengarang.Text = pengarang

Textharga.Text = harga

 

q = Mid(Cbokode, 1, 1)

If q = “A” Then

penerbit = “Andi Offset Yogyakarta”

ElseIf q = “I” Then

penerbit = “Indah Surabaya”

ElseIf q = “S” Then

penerbit = “SalembaEmpat”

ElseIf q = “E” Then

penerbit = “Elek Media Komputindo”

ElseIf q = “M” Then

penerbit = “Maxicom”

End If

Textpenerbit.Text = penerbit

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

End Sub

 

 

Private Sub Cndbatal_Click()

Cbokode.SetFocus

Textcode = “”

Textjudul = “”

Textpengarang = “”

Texttahun = “”

Textpenerbit = “”

Textharga = “”

End Sub

 

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Load()

Cbokode.AddItem “A-SIM-02”

Cbokode.AddItem “I-EDP-04”

Cbokode.AddItem “S-MNJ-06”

Cbokode.AddItem “E-CDR-08”

Cbokode.AddItem “M-RPL-12”

End Sub

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

 

End Sub

VISUAL BASIC

tugas10

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

End Sub

 

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdproses_Click()

Dim s As String

s = Mid(txtkode.Text, 5, 2)

If s = “SP” Then

txtnb.Text = “SPIDOL”

txthb.Text = “9500”

ElseIf s = “BT” Then

txtnb.Text = “BUKU TULIS”

txthb.Text = “12500”

ElseIf s = “TP” Then

txtnb.Text = “TIPE EX”

txthb.Text = “3000”

ElseIf s = “PG” Then

txtnb.Text = “PENGGARIS”

txthb.Text = “25000”

ElseIf s = ” PT” Then

txtnb.Text = “PAPAN TULIS”

txthb.Text = “50000”

End If

txtjb.SetFocus

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.AddNew

 

End Sub

 

Private Sub txthitung_Click()

txtby.Text = Val(txthb.Text) * Val(txtjb.Text)

txtpot.Text = Val(txtby.Text) * 0.02

txttb.Text = Val(txtby.Text) – Val(txtpot.Text)

 

End Sub

VISUAL BASIC

tugas9

 

Private Sub cmdbatal_Click()

Textnama = “”

Textnpm = “”

Textjurusan = “”

Textprogram = “”

Texttahun = “”

Texturut = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

Textnama = “”

Textnpm = “”

Textjurusan = “”

Textprogram = “”

Texttahun = “”

Texturut = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim jur As String

Dim ps As String

Dim M As String

M = Mid(Textnpm, 3, 1)

If M = 1 Then

jur = “sistem informasi”

ElseIf M = 2 Then

jur = “teknik informatika”

ElseIf M = 3 Then

jur = “menejemen informatika”

ElseIf M = 4 Then

jur = “komputer akuntansi”

End If

Textjurusan = jur

 

M = Mid(Textnpm, 4, 2)

If M = “01” Then

ps = “strata 1”

ElseIf M = “02” Then

ps = “diploma 4”

ElseIf M = “03” Then

ps = “diploma 3”

ElseIf M = “04” Then

ps = “diploma 2”

End If

Textprogram = ps

Texttahun = “20” & Left(Textnpm, 2)

Texturut = Right(Textnpm, 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 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()

Form2.Show

End Sub

VISUAL BASIC

tugas8

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form2.Show

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

Private Sub cmdlagi_Click()

kosong

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

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

Form2.Show

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

VISUAL BASIC

tugas7

 

Private Sub cmdbatal_Click()

Textnama = “”

Textnpm = “”

Textjurusan = “”

Textprogram = “”

Texttahun = “”

Texturut = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

Textnama = “”

Textnpm = “”

Textjurusan = “”

Textprogram = “”

Texttahun = “”

Texturut = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim jur As String

Dim ps As String

Dim M As String

M = Mid(Textnpm, 3, 1)

If M = 1 Then

jur = “sistem informasi”

ElseIf M = 2 Then

jur = “teknik informatika”

ElseIf M = 3 Then

jur = “menejemen informatika”

ElseIf M = 4 Then

jur = “komputer akuntansi”

End If

Textjurusan = jur

 

M = Mid(Textnpm, 4, 2)

If M = “01” Then

ps = “strata 1”

ElseIf M = “02” Then

ps = “diploma 4”

ElseIf M = “03” Then

ps = “diploma 3”

ElseIf M = “04” Then

ps = “diploma 2”

End If

Textprogram = ps

Texttahun = “20” & Left(Textnpm, 2)

Texturut = Right(Textnpm, 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 Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnpm.SetFocus

End If

End Sub

 

 

End Sub

VISUAL BASIC

tugas6

 

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

Textjenis = jenis

Texths = hs

Textjumlah.SetFocus

End Sub

 

 

Private Sub Cmdclose_Click()

Form2.Show

End Sub

 

 

Private Sub Cmdhl_Click()

Cbocode.SetFocus

Cbocode = “”

Textjenis = “”

Texths = “”

txthp = “”

Textjumlah = “”

Textdiskont = “”

Texthb = “”

End Sub

 

 

 

Private Sub Cmdproses_Click()

Texthp = Val(Textjumlah) * Val(Texths)

If Val(Texthp) > “30000000” Then

Textdiscont = Val(Texthp) * 15 / 100

ElseIf Val(Texthp) > “25000000” Then

Textdiscont = Val(Texthp) * 10 / 100

ElseIf Val(Texthp) > “20000000” Then

Textdiscont = Val(Texthp) * 5 / 100

ElseIf Val(Texthp) > “15000000” Then

Textdiscont = Val(Texthp) * 2 / 100

End If

Texthb = Val(Texthp) – Val(Textdiscont)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

Cbocode.SetFocus

Cbocode = “”

Textjenis = “”

Texths = “”

Textjumlah = “”

Textdiskont = “”

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

 

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

VISUAL BASIC

tugas5

 

Private Sub cbokode_Click()

Dim mt, hs As String

Select Case cbokode

Case “ASUS A43SA”

mt = “ASUS A43SA-VXO90D”

hs = “5500000”

Case “ASUS A43SD”

mt = “ASUS A43SD-VXO532D”

hs = “4500000”

Case “ASUS A435J”

mt = “ASUS A435J-VX792J”

hs = “4900000”

Case “ASUS N43L”

mt = “ASUS N43L-VX264D”

hs = “4300000”

Case “APPLE MD311”

mt = “APPLE MACBOOCK PRO MD311”

hs = “19300000”

Case “APPLE MD313”

mt = “APPLE MACBOOCK PRO MD313”

hs = “24200000”

Case “APPLE MD314”

mt = “APPLE MACBOOCK PRO MD314”

hs = “11900000”

Case “APPLE MD322”

mt = “APPLE MACKBOOCK PRO MD322 ”

hs = “14700000”

Case “APPLE MC95”

mt = “APPLE MACBOOK AIR MC965”

hs = “21300000”

End Select

txtmerk.Text = mt

txtharga.Text = hs

txtjumlah.SetFocus

 

End Sub

 

Private Sub Command1_Click()

txthargapen.Text = Val(txtharga.Text) * Val(txtjumlah.Text)

Select Case txthargapen.Text

Case Is > 14000000

txtdis.Text = Val(txthargapen.Text) * 15 / 100

Case Is > 135000000

txtdis.Text = Val(txthargapen.Text) * 10 / 100

Case Is > 130000000

txtdis.Text = Val(txthargapen.Text) * 5 / 100

Case Is > 125000000

txtdis.Text = Val(txthargapen.Text) * 2 / 100

End Select

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

 

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

 

End Sub

 

Private Sub Command3_Click()

cbokode.SetFocus

cbokode = “”

txtmerk = “”

txtharga = “”

txtjumlah = “”

txthargapen = “”

txtdis = “”

txttotal = “”

 

End Sub

 

Private Sub Command4_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command5_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Command6_Click()

Form2.Show

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “ASUS A43SA”

cbokode.AddItem “ASUS A43SD”

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

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

Private Sub cbokode_Click()

Dim mt, hs As String

Select Case cbokode

Case “ASUS A43SA”

mt = “ASUS A43SA-VXO90D”

hs = “5500000”

Case “ASUS A43SD”

mt = “ASUS A43SD-VXO532D”

hs = “4500000”

Case “ASUS A435J”

mt = “ASUS A435J-VX792J”

hs = “4900000”

Case “ASUS N43L”

mt = “ASUS N43L-VX264D”

hs = “4300000”

Case “APPLE MD311”

mt = “APPLE MACBOOCK PRO MD311”

hs = “19300000”

Case “APPLE MD313”

mt = “APPLE MACBOOCK PRO MD313”

hs = “24200000”

Case “APPLE MD314”

mt = “APPLE MACBOOCK PRO MD314”

hs = “11900000”

Case “APPLE MD322”

mt = “APPLE MACKBOOCK PRO MD322 ”

hs = “14700000”

Case “APPLE MC95”

mt = “APPLE MACBOOK AIR MC965”

hs = “21300000”

End Select

txtmerk.Text = mt

txtharga.Text = hs

txtjumlah.SetFocus

 

End Sub

 

Private Sub Command1_Click()

txthargapen.Text = Val(txtharga.Text) * Val(txtjumlah.Text)

Select Case txthargapen.Text

Case Is > 14000000

txtdis.Text = Val(txthargapen.Text) * 15 / 100

Case Is > 135000000

txtdis.Text = Val(txthargapen.Text) * 10 / 100

Case Is > 130000000

txtdis.Text = Val(txthargapen.Text) * 5 / 100

Case Is > 125000000

txtdis.Text = Val(txthargapen.Text) * 2 / 100

End Select

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

 

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

 

End Sub

 

Private Sub Command3_Click()

cbokode.SetFocus

cbokode = “”

txtmerk = “”

txtharga = “”

txtjumlah = “”

txthargapen = “”

txtdis = “”

txttotal = “”

 

End Sub

 

Private Sub Command4_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command5_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Command6_Click()

Form2.Show

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “ASUS A43SA”

cbokode.AddItem “ASUS A43SD”

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

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

VISUAL BASIC

NINA RISTI PAMUNGKAS1tugas4

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

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

Textharga = hs

Textjumlah.SetFocus

End Sub

 

 

 

Private Sub cmdhitung_Click()

Cbocode.SetFocus

Cbocode = “”

Textmerk = “”

Textharga = “”

Textjumlah = “”

Textharpen = “”

Textdiscount = “”

Texttotal = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdproses_Click()

Textharpen = Val(Textjumlah) * Val(Textharga)

If Val(Textharpen) > 140000000 Then

Textdiscount = Val(Textharga) * 15 / 100

ElseIf Val(Textharpen) > 135000000 Then

Textdiscount = Val(Textharpen) * 10 / 100

ElseIf Val(Textharpen) > 130000000 Then

Textdiscount = Val(Textharpen) * 5 / 100

ElseIf Val(Textharpen) > 125000000 Then

Textdiscount = Val(Textharpen) * 2 / 100

End If

Texttotal = Val(Textharpen) – Val(txtdiscount)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

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 “MC322”

End Sub

 

 

Private Sub Textjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Texthp.SetFocus

End If

End Sub