database tugas 1 semester 3

Posted on Updated on

databasetipe d.JPG

Private Sub cbokb_Click()

Dim jb, peng, TH, pen, hg As String

Select Case cbokb.Text

Case “A-SIM-01”

jb = “SISTEM INFOMASI MANAJEMEN”

peng = “Yati Nur Oktavia”

TH = “2001”

pen = “Andi Offset Yogyakarta”

hg = “75900”

Case “I-EDP-02”

jb = “ELEKTRONIK DATA PROCESSING”

peng = “Imam Tarmizi”

TH = “2002”

pen = “Indah Surabaya”

hg = “62000”

Case “S-MNJ-03”

jb = “MANAJEMEN”

peng = “Valentina Mariana Adiwianti”

TH = “2003”

pen = “Salemba Empat”

hg = “42000”

Case “E-CDR-04”

jb = “corel draw”

peng = “Riyan Suhandi”

TH = “2004”

pen = “Elek Media Komputindo”

hg = “53000”

Case “M-RPL-05”

jb = “REKAYASA PERANGKAT LUNAK”

peng = “Sinta Umpu Singa”

TH = “2005”

pen = “Maxicom”

hg = “83000”

End Select

txtjb.Text = jb

txtpeng.Text = peng

txttahun.Text = TH

txtpenerbit.Text = pen

txthg.Text = hg

 

 

End Sub

 

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokb.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

Dim jb, peng, pen, hg As String

Txttt.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 = “Rekayasa Perangkat Lunak”

pg = “Sinta UmpuSinga”

hg = “83000”

End If

txtjb.Text = jb

Txtpg.Text = pg

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

Txtpn.Text = pn

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-02”

cbokb.AddItem “S-MNJ-03”

cbokb.AddItem “E-CDR-04”

cbokb.AddItem “M-RPL-05”

 

End Sub

tt

 

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

Iklan

13 PROGRAM

Posted on

TIPE A

DATABASE TIPE A

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtkt.SetFocus

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdlagi_Click()

txtkt.SetFocus

txtkt.Text

txtjk.Text

txtjb.Text

txttp.Text

 

End Sub

 

Private Sub cmdproses_Click()

Dim KT, JK, JB As String

Dim HT As Currency

KT = Left(txtkt.Text, 3)

If KT = “BIM” Then

HT = “50000”

JK = “BIMA”

JB = “16.00”

ElseIf KT = “EKO” Then

HT = “35000”

JK = “EKONOMI”

JB = “19.00”

ElseIf KT = “MUT” Then

HT = “23000”

JK = “MUTIARA”

JB = “17.00”

ElseIf KT = “SEN” Then

HT = “20000”

JK = “SENJA”

JB = “20.00”

End If

txtkt.Text = KT

txtht.Text = HT

txtjk.Text = JK

txtjb.Text = JB

txtjt.SetFocus

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

 

Private Sub txtjt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttp.Text = Val(txtht.Text) * Val(txtjt.Text)

End If

 

End Sub

tt.JPG

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE B

DATABASETIPE B.JPG

Private Sub cbokb_Click()

Dim jb, peng, TH, pen, hg As String

Select Case cbokb.Text

Case “A-SIM-01”

jb = “SISTEM INFOMASI MANAJEMEN”

peng = “Andra Setiawan”

TH = “2001”

pen = “Andi Offset Yogyakarta”

hg = “75900”

Case “I-EDP-02”

jb = “ELEKTRONIK DATA PROCESSING”

peng = “Desi Istiqomah”

TH = “2002”

pen = “Indah Surabaya”

hg = “62000”

Case “S-MNJ-03”

jb = “MANAJEMEN”

peng = “Sandy Fitrajaya”

TH = “2003”

pen = “Salemba Empat”

hg = “42000”

Case “E-CDR-04”

jb = “corel draw”

peng = “Tri Indah Sari”

TH = “2004”

pen = “Elek Media Komputindo”

hg = “53000”

Case “M-RPL-05”

jb = “REKAYASA PERANGKAT LUNAK”

peng = “Ernita Sari”

TH = “2005”

pen = “Maxicom”

hg = “83000”

End Select

txtjb.Text = jb

txtpeng.Text = peng

txttahun.Text = TH

txtpenerbit.Text = pen

txthg.Text = hg

 

 

End Sub

 

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokb.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

Dim jb, peng, pen, hg As String

Txttt.Text = “20” & Right(cbokode, 2)

S = Mid(cbokode, 3, 3)

If S = “SIM” Then

jb = “Sistem informasi manajemen”

pg = “Andra Setiawan”

hg = “75900”

ElseIf S = “EDP” Then

jb = “Elektronik Data Processing”

pg = “Desi Istiqomah”

hg = “62000”

ElseIf S = “MNJ” Then

jb = “Manajemen”

pg = “Sandy Fitrajaya”

hg = “42000”

ElseIf S = “CDR” Then

jb = “Corel Draw”

pg = “Tri Indah Sari”

hg = “53000”

ElseIf S = “RPL” Then

jb = “Rekayasa Perangkat Lunak”

pg = “Ernita Sari”

hg = “83000”

End If

txtjb.Text = jb

Txtpg.Text = pg

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

Txtpn.Text = pn

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-02”

cbokb.AddItem “S-MNJ-03”

cbokb.AddItem “E-CDR-04”

cbokb.AddItem “M-RPL-05”

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE C

DATABASETIPE C.JPG

Private Sub cbokode_Click()

Dim JENISKOMPUTER, HARGASATUAN As String

Select Case cbokode.Text

Case “P205”

JENISKOMPUTER = “Pentium II 500 Mega Hz”

HARGASATUAN = “1500000”

Case “P308”

JENISKOMPUTER = “Pentium III 800 Mega Hz”

HARGASATUAN = “2100000”

Case “P310”

JENISKOMPUTER = “Pentium III 1.0 Giga Hz”

HARGASATUAN = “3500000”

Case “P415”

JENISKOMPUTER = “Pentium IV 1.5 Giga Hz”

HARGASATUAN = “4000000”

Case “P417”

JENISKOMPUTER = “Pentium IV 1.7 Giga Hz”

HARGASATUAN = “4200000”

Case “P419”

JENISKOMPUTER = “Pentium IV 1.9 Giga Hz”

HARGASATUAN = “5500000”

End Select

txtjk.Text = JENISKOMPUTER

txths.Text = HARGASATUAN

txtjj.SetFocus

End Sub

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

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

txthb.Text = “”

 

End Sub

 

Private Sub cmdproses_Click()

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

If txthp.Text > 30000000 Then

txtdis.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis.Text = Val(txthp.Text) * 0.1

ElseIf txthp > 20000000 Then

txtdis.Text = Val(txthp.Text) * 0.05

ElseIf txthp > 15000000 Then

txtdis.Text = Val(txthp.Text) * 0.2

End If

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

 

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub cmdsimpan_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjj.SetFocus

End If

 

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)

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

If txthp.Text > 30000000 Then

txtdis.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis.Text = Val(txthp.Text) * 0.1

ElseIf txthp > 20000000 Then

txtdis.Text = Val(txthp.Text) * 0.05

ElseIf txthp > 15000000 Then

txtdis.Text = Val(txthp.Text) * 0.2

End If

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

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE D

databasetipe d.JPG

Private Sub cbokb_Click()

Dim jb, peng, TH, pen, hg As String

Select Case cbokb.Text

Case “A-SIM-01”

jb = “SISTEM INFOMASI MANAJEMEN”

peng = “Yati Nur Oktavia”

TH = “2001”

pen = “Andi Offset Yogyakarta”

hg = “75900”

Case “I-EDP-02”

jb = “ELEKTRONIK DATA PROCESSING”

peng = “Imam Tarmizi”

TH = “2002”

pen = “Indah Surabaya”

hg = “62000”

Case “S-MNJ-03”

jb = “MANAJEMEN”

peng = “Valentina Mariana Adiwianti”

TH = “2003”

pen = “Salemba Empat”

hg = “42000”

Case “E-CDR-04”

jb = “corel draw”

peng = “Riyan Suhandi”

TH = “2004”

pen = “Elek Media Komputindo”

hg = “53000”

Case “M-RPL-05”

jb = “REKAYASA PERANGKAT LUNAK”

peng = “Sinta Umpu Singa”

TH = “2005”

pen = “Maxicom”

hg = “83000”

End Select

txtjb.Text = jb

txtpeng.Text = peng

txttahun.Text = TH

txtpenerbit.Text = pen

txthg.Text = hg

 

 

End Sub

 

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokb.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

Dim jb, peng, pen, hg As String

Txttt.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 = “Rekayasa Perangkat Lunak”

pg = “Sinta UmpuSinga”

hg = “83000”

End If

txtjb.Text = jb

Txtpg.Text = pg

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

Txtpn.Text = pn

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-02”

cbokb.AddItem “S-MNJ-03”

cbokb.AddItem “E-CDR-04”

cbokb.AddItem “M-RPL-05”

 

End Sub

tt

 

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE E

db tipe e

Private Sub cbokb_Click()

Dim jb, peng, TH, pen, hg As String

Select Case cbokb.Text

Case “A-SIM-01”

jb = “SISTEM INFOMASI MANAJEMEN”

peng = “Fadiya Ulfa”

TH = “2009”

pen = “Andi Offset Yogyakarta”

hg = “75900”

Case “I-EDP-02”

jb = “ELEKTRONIK DATA PROCESSING”

peng = “Nurul Agustina”

TH = “2010”

pen = “Indah Surabaya”

hg = “62000”

Case “S-MNJ-03”

jb = “MANAJEMEN”

peng = “Rian Hidayat”

TH = “2011”

pen = “Salemba Empat”

hg = “42000”

Case “E-CDR-04”

jb = “corel draw”

peng = “Siti Nur Khotimah”

TH = “2012”

pen = “Elek Media Komputindo”

hg = “53000”

Case “M-RPL-05”

jb = “REKAYASA PERANGKAT LUNAK”

peng = “Winda Erlianti”

TH = “2013”

pen = “Maxicom”

hg = “83000”

End Select

txtjb.Text = jb

txtpeng.Text = peng

txttahun.Text = TH

txtpenerbit.Text = pen

txthg.Text = hg

 

 

End Sub

 

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokb.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

Dim jb, peng, pen, hg As String

Txttt.Text = “20” & Right(cbokode, 2)

S = Mid(cbokode, 3, 3)

If S = “SIM” Then

jb = “Sistem informasi manajemen”

pg = “Fadiya Ulfa”

hg = “75900”

ElseIf S = “EDP” Then

jb = “Elektronik Data Processing”

pg = “Nurul Agustina”

hg = “62000”

ElseIf S = “MNJ” Then

jb = “Manajemen”

pg = “Rian Hidayat”

hg = “42000”

ElseIf S = “CDR” Then

jb = “Corel Draw”

pg = “Siti Nur Khotimah”

hg = “53000”

ElseIf S = “RPL” Then

jb = “Rekayasa Perangkat Lunak”

pg = “Winda Erlianti”

hg = “83000”

End If

txtjb.Text = jb

Txtpg.Text = pg

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

Txtpn.Text = pn

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-02”

cbokb.AddItem “S-MNJ-03”

cbokb.AddItem “E-CDR-04”

cbokb.AddItem “M-RPL-05”

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE F

db tipe f.JPG

Private Sub cbokode_Click()

Dim merk, hs As String

Select Case cbokode.Text

Case “asus A43SA”

merk = “asus A43SA-VX090D”

hs = “5500000”

Case “AsusA43SD”

merk = “Asus A43SD-VX052D”

hs = “4500000”

Case “AsusA43SJ”

merk = “Asus A43SJ-VX792D”

hs = “4300000”

Case “AsusA43TA”

merk = “Asus A43TA-VX034D”

hs = “4900000”

Case “AsusN43SL”

merk = “Asus N43SL-VX264D”

hs = “4300000”

Case “Apple MD311”

merk = “Apple MacBook Pro MD311”

hs = “19300000”

Case “Apple MD313”

merk = “Apple MacBook Pro MD313”

hs = “24200000”

Case “Apple MD314”

merk = “Apple MacBook Pro MD314”

hs = “11900000”

Case “Apple MD322”

merk = “Apple MacBook Pro MD322”

hs = “14700000”

Case “Apple MC965”

merk = “Apple MacBook Pro MC965”

hs = “21300000”

End Select

txtmerk.Text = merk

txths.Text = hs

txtjj.SetFocus

 

End Sub

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdhitung_Click()

cbokode.SetFocus

cbokode.Text = “”

txtmerk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

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

Select Case txthp.Text

Case Is > 140000000

txtdis.Text = Val(txthp) * 0.15

Case Is > 135000000

txtdis.Text = Val(txthp) * 0.1

Case Is > 130000000

txtdis.Text = Val(txthp) * 0.05

Case Is > 125000000

txtdis.Text = Val(txthp) * 0.02

End Select

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

 

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

cbokode.AddItem “Apple MD311”

cbokode.AddItem “Apple MD313”

cbokode.AddItem “Apple MD314”

cbokode.AddItem “Apple MD322”

cbokode.AddItem “Apple MC965”

cbokode.AddItem “Apple MC314 MacBook Pro”

cbokode.AddItem “Apple MC318 MacBook Pro”

cbokode.AddItem “Apple MC322 MacBook Pro”

cbokode.AddItem “Apple MC965 MacBook Air”

cbokode.AddItem “Apple MC966 MacBook Air”

 

 

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

txtdis.Text = Val(txthp) * 0.15

Case Is > 135000000

txtdis.Text = Val(txthp) * 0.1

Case Is > 130000000

txtdis.Text = Val(txthp) * 0.05

Case Is > 125000000

txtdis.Text = Val(txthp) * 0.02

End Select

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

End If

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

DBTTIPE G

Private Sub cmdadd_Click()

Data1.Recordset.AddNew

txtkode.SetFocus

 

End Sub

 

Private Sub cmdcancle_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdhitung_Click()

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

If Val(txtjb.Text) > “5” Then

txtpot.Text = Val(txtbayar) * 0.02

txttb.Text = Val(txtbayar.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 = “tipe ex”

txthb.Text = “3000”

ElseIf h = “pg” Or h = “pd” Then

txthb.Text = “penggaris”

txthb.Text = “2500”

ElseIf h = “pt” Or h = “pt” Then

txtnb.Text = “papantulis”

txthb.Text = “5000”

End If

txtjb.SetFocus

 

End Sub

 

Private Sub cmdsave_Click()

Data1.Recordset.Update

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE H

 

db tipe h.JPG

Private Sub cbokode_Click()

Dim jk, hs, HB 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 Mega Hz”

hs = “3500000”

Case “P415”

jk = “Pentium IV 1.5 Mega Hz”

hs = “4000000”

Case “P417”

jk = “Pentium IV 1.7 Mega Hz”

hs = “4200000”

Case “P419”

jk = “Pentium IV 1.9 Mega Hz”

hs = “5500000”

End Select

txtjk.Text = jk

txths.Text = hs

txtjj.SetFocus

 

End Sub

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdhitung_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

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

 

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

 

 

Private Sub txtjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthp.Text = Val(txthp) * 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(Txtdiskon)

End If

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

TIPE I

DBTIPE I

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnk.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

txtnk.SetFocus

txtnk.Text = “”

txtgol.Text = “”

txtkstat.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgp.Text = “”

txttun.Text = “”

txttg.Text = “”

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdlagi_Click()

txtnk.SetFocus

txtnk.Text = “”

txtgol.Text = “”

txtkstat.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgp.Text = “”

txttun.Text = “”

txttg.Text = “”

 

End Sub

 

Private Sub cmdproses_Click()

Dim R As String

R = Mid(txtnik.Text, 5, 1)

If R = “A” Then

txtgol = “A”

txtjabatan.Text = “MANAGER”

txtgp.Text = “4000000”

txttun.Text = “1025000”

ElseIf R = “B” Then

txtgol.Text = “B”

txtjabatan.Text = “Ka.SEKSI”

txtgp.Text = “3500000”

txttun.Text = “975000”

ElseIf R = “C” Then

txtgol.Text = “C”

txtjabatan.Text = “STAFF”

txtgp.Text = “3000000”

txttun.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)

txttg.Text = Val(txtgp.Text) + Val(txttun.Text)

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

PROGRAM 1

PROGRAM 1.JPG

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

txttun.Text = tunjangan

txtpajak.Text = pajak

txttt.Text = total – pajak

 

 

End Sub

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnidn.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

kosong

 

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdlagi_Click()

kosong

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

 

End Sub

 

Private Sub Form_Load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

 

End Sub

 

Public Sub kosong()

txtnidn.SetFocus

txtnidn.Text = “”

Txtnama.Text = “”

cbogolongan.Text = “”

txtgapok.Text = “”

Txttunjangan.Text = “”

txtpajak.Text = “”

Txttotal.Text = “”

 

End Sub

 

 

 

Private Sub txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

PROGRAM2

PROGRAM2.JPG

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

 

End Sub

 

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttahun.Text = “”

txtnu.Text = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttahun.Text = “”

txtnu.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim J, P, S As String

txttm.Text = “20” & Left(txtnpm.Text, 2)

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjur.Text = “sistem informasi”

txtbp.Text = “1950000”

ElseIf S = “2” Then

txtjur.Text = “menejemen informatika”

txtbp.Text = “1650000”

ElseIf S = “3” Then

txtjur.Text = “tehnik informatika”

txtbp.Text = “1750000”

ElseIf S = “4” Then

txtjur.Text = “menejemen &komp akutansi”

txtbp.Text = “1450000”

 

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

txtps.Text = “DIPLOMA EMPAT”

ElseIf S = “4” Then

txtps.Text = “DIPLOMA DUA”

End If

txtnu.Text = Right(txtnpm.Text, 3)

 

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

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

PROGRAM 3

PROG 3.JPG

Private Sub cmdadd_Click()

Data1.Recordset.AddNew

txtkode.SetFocus

 

End Sub

 

Private Sub cmdcancle_Click()

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdhitung_Click()

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

If Val(txtjb.Text) > “5” Then

txtpot.Text = Val(txtbayar) * 0.02

txttb.Text = Val(txtbayar.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 = “tipe ex”

txthb.Text = “3000”

ElseIf h = “pg” Or h = “pd” Then

txthb.Text = “penggaris”

txthb.Text = “2500”

ElseIf h = “pt” Or h = “pt” Then

txtnb.Text = “papantulis”

txthb.Text = “5000”

End If

txtjb.SetFocus

 

End Sub

 

Private Sub cmdsave_Click()

Data1.Recordset.Update

 

End Sub

tt

Private Sub cmdno_click()

End

End Sub

Private Sub cmdyes_Click()

Form1.Show

End Sub

lanjutan

Posted on

tugas2

ERMA TUGAS 2

Private Sub cmdbatal_Click()

Textnama.SetFocus

Textnama = “”

Textnpm = “”

Textjur = “”

Textps = “”

Texttm = “”

Textnu = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

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

Textps = “diploma 2”

End If

Textnu = Right(Textnpm, 3)

End Sub

Tugas 3

ERMA TUGAS 3

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

TxtTm.Text = “”

Txturut.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

Unload Me

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, 4, 2)

If S = “01” Then

Txtps.Text = “Strata Satu”

ElseIf S = “02” Then

Txtps.Text = “Diploma Tiga”

ElseIf S = “03” Then

Txtps.Text = “Diploma Empat”

ElseIf S = “04” Then

Txtps.Text = “Diploma Dua”

End If

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

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, 4, 2)

If S = “01” Then

Txtps.Text = “Strata Satu”

ElseIf S = “02” Then

Txtps.Text = “Diploma Tiga”

ElseIf S = “03” Then

Txtps.Text = “Diploma Empat”

ElseIf S = “04” Then

Txtps.Text = “Diploma Dua”

End If

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

End Sub

Private Sub Form_activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtps.Text = “”

TxtTm.Text = “”

Txturut.Text = “”

End Sub

Private Sub Txtnama_Keypress(Keyascii As Integer)

If Keyascii = 13 Then

Txtnpm.SetFocus

End If

End Sub

 

 

 

 

Private Sub Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnpm.SetFocus

End If

End Sub

 

Posted on Updated on

TIPE A

TIPE A

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
txtkt.SetFocus
txtkt.Text
txtjk.Text
txtjb.Text
txttp.Text

End Sub

Private Sub cmdproses_Click()
Dim KT, JK, JB As String
Dim HT As Currency
KT = Left(txtkt.Text, 3)
If KT = “BIM” Then
HT = “50000”
JK = “BIMA”
JB = “16.00”
ElseIf KT = “EKO” Then
HT = “35000”
JK = “EKONOMI”
JB = “19.00”
ElseIf KT = “MUT” Then
HT = “23000”
JK = “MUTIARA”
JB = “17.00”
ElseIf KT = “SEN” Then
HT = “20000”
JK = “SENJA”
JB = “20.00”
End If
txtkt.Text = KT
txtht.Text = HT
txtjk.Text = JK
txtjb.Text = JB
txtjt.SetFocus

End Sub
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttp.Text = Val(txtht.Text) * Val(txtjt.Text)
End If

End Sub

TIPE B

TIPE B dan e

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me

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
s = Mid(txtkb.Text, 8, 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 Koputindo”
ElseIf s = “M” Then
txtpenerbit.Text = “Maxicom”
End If
s = Mid(txtkb.Text, 1, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtp.Text = “Fadiyah Ulfa”
txthg.Text = “75900”
ElseIf s = “EDP” Then
txtjb.Text = “Elektronik Data Processing”
txtp.Text = “Nurul Agustina”
txthg.Text = “62000”
ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtp.Text = “Rian Hidayat”
txthg.Text = “42000”
ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtp.Text = “Siti Nur Khotimah”
txthg.Text = “62000”
ElseIf s = “RPL” Then
txtjb.Text = “Rekayasa Perangkat Lunak”
txtp.Text = “Winda Erlianti”
txthg.Text = “83000”
End If
txttahun.Text = “20” & Mid(txtkb.Text, 5, 2)
End Sub

TIPE C

TIPE C
Private Sub cbokodekom_Click()
Dim JENISKOMPUTER, HARGASATUAN As String
Select Case cbokodekom.Text
Case “P205”
JENISKOMPUTER = “Pentium II 500 Mega Hz”
HARGASATUAN = “1500000”
Case “P308”
JENISKOMPUTER = “Pentium III 800 Mega Hz”
HARGASATUAN = “2100000”
Case “P310”
JENISKOMPUTER = “Pentium III 1.0 Giga Hz”
HARGASATUAN = “3500000”
Case “P415”
JENISKOMPUTER = “Pentium IV 1.5 Giga Hz”
HARGASATUAN = “4000000”
Case “P417”
JENISKOMPUTER = “Pentium IV 1.7 Giga Hz”
HARGASATUAN = “4200000”
Case “P419”
JENISKOMPUTER = “Pentium IV 1.9 Giga Hz”
HARGASATUAN = “5500000”
End Select
txtjk.Text = JENISKOMPUTER
txths.Text = HARGASATUAN
txtjj.SetFocus

End Sub

Private Sub cmdclose_Click()
End

End Sub

Private Sub cmdhitung_Click()
cbokodekom.SetFocus
cbokodekom.Text = “”
txtjk.Text = “”
txths.Text = “”
txtjj.Text = “”
txthp.Text = “”
txtdis.Text = “”
txthb.Text = “”

End Sub

Private Sub cmdproses_Click()
txthp = Val(txths.Text) * Val(txtjj.Text)
Select Case txthp.Text
Case Is > 30000000
discount = Val(txthp.Text) * 0.15
Case Is > 25000000
discount = Val(txthp.Text) * 0.1
Case Is > 20000000
discount = Val(txthp.Text) * 0.05
Case Is > 15000000
discount = Val(txthp.Text) * 0.02
End Select
txtdis.Text = discount
txthb.Text = Val(txthp.Text) – Val(txtdis.Text)
End Sub

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

End Sub

TIPE D

tipe d

Private Sub cbokb_Click()
Dim jb, peng, TH, pen, hg As String
Select Case cbokb.Text
Case “A-SIM-01”
jb = “SISTEM INFOMASI MANAJEMEN”
peng = “Yati Nur Oktavia”
TH = “2001”
pen = “Andi Offset Yogyakarta”
hg = “75900”
Case “I-EDP-02”
jb = “ELEKTRONIK DATA PROCESSING”
peng = “Imam Tarmizi”
TH = “2002”
pen = “Indah Surabaya”
hg = “62000”
Case “S-MNJ-03”
jb = “MANAJEMEN”
peng = “Valentina Mariana Adiwianti”
TH = “2003”
pen = “Salemba Empat”
hg = “42000”
Case “E-CDR-04”
jb = “corel draw”
peng = “Riyan Suhandi”
TH = “2004”
pen = “Elek Media Komputindo”
hg = “53000”
Case “M-RPL-05”
jb = “REKAYASA PERANGKAT LUNAK”
peng = “Sinta Umpu Singa”
TH = “2005”
pen = “Maxicom”
hg = “83000”
End Select
txtjb.Text = jb
txtpeng.Text = peng
txttahun.Text = TH
txtpenerbit.Text = pen
txthg.Text = hg

End Sub

Private Sub cmdbatal_Click()
cbokb.SetFocus
cbokb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
cbokb.SetFocus
cbokb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”

End Sub

Private Sub cmdproses_Click()
Dim jb, peng, pen, hg As String
txttahun.Text = “20” & Right(cbokb, 2)
S = Mid(cbokb, 3, 3)
If S = “SIM” Then
jb = “Sistem informasi manajemen”
peng = “Yati Nur Oktavia”
hg = “75900”
ElseIf S = “EDP” Then
jb = “Elektronik Data Processing”
peng = “Imam Tarmizi”
hg = “62000”
ElseIf S = “MNJ” Then
peng = “Valentina Mariana Adiwianti”
jb = “Manajemen”
hg = “42000”
ElseIf S = “CDR” Then
jb = “Corel Draw”
peng = “Riyan Suhandi”
hg = “53000”
ElseIf S = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
peng = “Sinta UmpuSinga”
hg = “83000”
End If
txtjb.Text = jb
txtpeng.Text = peng
txthg.Text = hg
S = Mid(cbokb, 1, 1)
If S = “A” Then
pen = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
pen = “Indah Surabaya”
ElseIf S = “S” Then
pen = “SalembaEmpat”
ElseIf S = “E” Then
pen = “Elek Media Komputindo”
ElseIf S = “M” Then
pen = “Maxicom”
End If
txtpenerbit.Text = pen

End Sub

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

End Sub

TIPE E

TIPE B dan e

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me

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
s = Mid(txtkb.Text, 8, 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 Koputindo”
ElseIf s = “M” Then
txtpenerbit.Text = “Maxicom”
End If
s = Mid(txtkb.Text, 1, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtp.Text = “Fadiyah Ulfa”
txthg.Text = “75900”
ElseIf s = “EDP” Then
txtjb.Text = “Elektronik Data Processing”
txtp.Text = “Nurul Agustina”
txthg.Text = “62000”
ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtp.Text = “Rian Hidayat”
txthg.Text = “42000”
ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtp.Text = “Siti Nur Khotimah”
txthg.Text = “62000”
ElseIf s = “RPL” Then
txtjb.Text = “Rekayasa Perangkat Lunak”
txtp.Text = “Winda Erlianti”
txthg.Text = “83000”
End If
txttahun.Text = “20” & Mid(txtkb.Text, 5, 2)
End Sub

TIPE F

tipe f
Private Sub cbokode_Click()
Dim merk, hs As String
Select Case cbokode.Text
Case “asus A43SA”
merk = “asus A43SA-VX090D”
hs = “5500000”
Case “AsusA43SD”
merk = “Asus A43SD-VX052D”
hs = “4500000”
Case “AsusA43SJ”
merk = “Asus A43SJ-VX792D”
hs = “4300000”
Case “AsusA43TA”
merk = “Asus A43TA-VX034D”
hs = “4900000”
Case “AsusN43SL”
merk = “Asus N43SL-VX264D”
hs = “4300000”
Case “Apple MD311”
merk = “Apple MacBook Pro MD311”
hs = “19300000”
Case “Apple MD313”
merk = “Apple MacBook Pro MD313”
hs = “24200000”
Case “Apple MD314”
merk = “Apple MacBook Pro MD314”
hs = “11900000”
Case “Apple MD322”
merk = “Apple MacBook Pro MD322”
hs = “14700000”
Case “Apple MC965”
merk = “Apple MacBook Pro MC965”
hs = “21300000”
End Select
txtmerk.Text = merk
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 = “”
txttb.Text = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdproses_Click()
txthp.Text = Val(txths) * Val(txtjj)
Select Case txthp.Text
Case Is > 140000000
txtdis.Text = Val(txthp) * 0.15
Case Is > 135000000
txtdis.Text = Val(txthp) * 0.1
Case Is > 130000000
txtdis.Text = Val(txthp) * 0.05
Case Is > 125000000
txtdis.Text = Val(txthp) * 0.02
End Select
txttb.Text = Val(txthp) – Val(txtdis)

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 A43SL”
cbokode.AddItem “Apple MD311”
cbokode.AddItem “Apple MD313”
cbokode.AddItem “Apple MD314”
cbokode.AddItem “Apple MD322”
cbokode.AddItem “Apple MC965”
cbokode.AddItem “Apple MC314 MacBook Pro”
cbokode.AddItem “Apple MC318 MacBook Pro”
cbokode.AddItem “Apple MC322 MacBook Pro”
cbokode.AddItem “Apple MC965 MacBook Air”
cbokode.AddItem “Apple MC966 MacBook Air”

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
txtdis.Text = Val(txthp) * 0.15
Case Is > 135000000
txtdis.Text = Val(txthp) * 0.1
Case Is > 130000000
txtdis.Text = Val(txthp) * 0.05
Case Is > 125000000
txtdis.Text = Val(txthp) * 0.02
End Select
txttb.Text = Val(txthp) – Val(txtdis)
End If

End Sub

TIPE G

TIPE G

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttahun.Text = “”
txtnu.Text = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttahun.Text = “”
txtnu.Text = “”

End Sub

Private Sub cmdproses_Click()
Dim s As String
txttahun.Text = “20” & Left(txtnpm.Text, 2)
s = Mid(txtnpm.Text, 3, 1)
If s = “1” Then
txtjur.Text = “sistem informasi”
txtps = “strata satu”
txtbp.Text = “1950000”
ElseIf s = “2” Then
txtjur.Text = “menejemen informatika”
txtps = “diploma tiga”
txtbp.Text = “1650000”
ElseIf s = “3” Then
txtjur.Text = “tehnik informatika”
txtps = “diploma empat”
txtbp.Text = “1750000”
ElseIf s = “4” Then
txtjur.Text = “menejemen &komp akutansi”
txtps = “diploma dua”
txtbp.Text = “1450000”
End If
txtnu.Text = Right(txtnpm.Text, 3)
End Sub

TIPE H

TIPE H

Private Sub cbokode_Click()
Dim jk, hs, HB 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 Mega Hz”
hs = “3500000”
Case “P415”
jk = “Pentium IV 1.5 Mega Hz”
hs = “4000000”
Case “P417”
jk = “Pentium IV 1.7 Mega Hz”
hs = “4200000”
Case “P419”
jk = “Pentium IV 1.9 Mega Hz”
hs = “5500000”
End Select
txtjk.Text = jk
txths.Text = hs
txtjj.SetFocus

End Sub

Private Sub cmdhitung_Click()
cbokode.SetFocus
cbokode.Text = “”
txtjk.Text = “”
txths.Text = “”
txtjj.Text = “”
txthp.Text = “”
txtdis.Text = “”
txttb.Text = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

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(Txtdiskon)
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(txthp) * 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(Txtdiskon)
End If

End Sub

TIPE I

TIPE I

Private Sub cbokode_Click()
Dim jk, hs, HB 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 Mega Hz”
hs = “3500000”
Case “P415”
jk = “Pentium IV 1.5 Mega Hz”
hs = “4000000”
Case “P417”
jk = “Pentium IV 1.7 Mega Hz”
hs = “4200000”
Case “P419”
jk = “Pentium IV 1.9 Mega Hz”
hs = “5500000”
End Select
txtjk.Text = jk
txths.Text = hs
txtjj.SetFocus

End Sub

Private Sub cmdhitung_Click()
cbokode.SetFocus
cbokode.Text = “”
txtjk.Text = “”
txths.Text = “”
txtjj.Text = “”
txthp.Text = “”
txtdis.Text = “”
txttb.Text = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

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(Txtdiskon)
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(txthp) * 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(Txtdiskon)
End If

End Sub

TUGAS 2

 

Visual Basic

Posted on Updated on

scrnvb1erma

1.1
Private Sub cmdbatal_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txtn3 = “”
txtn4 = “”
txtn5 = “”
txtn6 = “”
txtn7 = “”
txtn8 = “”
txthasil1 = “”
txthasil2 = “”
txthasil3 = “”
txthasil4 = “”

End Sub

Private Sub cmdhitung_Click()
txthasil1 = Val(txtn1) * Val(txtn2)
txthasil2 = Val(txtn3) + Val(txtn4)
txthasil3 = Val(txtn5) – Val(txtn6)
txthasil4 = Val(txtn7) / Val(txtn8)

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txtn3 = “”
txtn4 = “”
txtn5 = “”
txtn6 = “”
txtn7 = “”
txtn8 = “”
txthasil1 = “”
txthasil2 = “”
txthasil3 = “”
txthasil4 = “”

End Sub

Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If

End Sub

Private Sub txtn2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn3.SetFocus
End If

End Sub

Private Sub txtn3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn4.SetFocus
End If

End Sub

Private Sub txtn4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn5.SetFocus
End If

End Sub

Private Sub txtn5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn6.SetFocus
End If

End Sub

Private Sub txtn6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn7.SetFocus
End If

End Sub

Private Sub txtn7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn8.SetFocus
End If

End Sub

vb kalmin2.JPG

1.2
Private Sub cmdbatal_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txtn3 = “”
txtn4 = “”
txtn5 = “”
txtn6 = “”
txtn7 = “”
txtn8 = “”
txthasil1 = “”
txthasil2 = “”
txthasil3 = “”
txthasil4 = “”

End Sub

Private Sub cmdhitung_Click()
txthasil1 = Val(txtn1) * Val(txtn2)
txthasil2 = Val(txtn3) + Val(txtn4)
txthasil3 = Val(txtn5) – Val(txtn6)
txthasil4 = Val(txtn7) / Val(txtn8)

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txtn3 = “”
txtn4 = “”
txtn5 = “”
txtn6 = “”
txtn7 = “”
txtn8 = “”
txthasil1 = “”
txthasil2 = “”
txthasil3 = “”
txthasil4 = “”

End Sub

Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If

End Sub

Private Sub txtn2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn3.SetFocus
txthasil1 = Val(txtn1) * Val(txtn2)
End If

End Sub

Private Sub txtn3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn4.SetFocus
End If

End Sub

Private Sub txtn4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn5.SetFocus
txthasil2 = Val(txtn3) + Val(txtn4)
End If

End Sub

Private Sub txtn5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn6.SetFocus
End If

End Sub

Private Sub txtn6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn7.SetFocus
txthasil3 = Val(txtn5) – Val(txyn6)
End If

End Sub

Private Sub txtn7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn8.SetFocus
End If

End Sub
Private Sub txtn8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txthasil4 = Val(txtn7) / Val(txtn8)
End If

End Sub

diskon1

2.1

Private Sub cmdhitung_Click()
txtdis = Val(txtha) * 0.1
txtak = Val(txtha) – Val(txtdis)

End Sub

Private Sub cmdkeluar_Click()
End

End Sub

Private Sub cmdulang_Click()
txtha.SetFocus
txtha = “”
txtdis = “”
txtak = “”

End Sub

diskon2.JPG

2.2

Private Sub cmdhitung_Click()
txtdis = Val(txtha) * 0.1
txtak = Val(txtha) – Val(txtdis)

End Sub

Private Sub cmdkeluar_Click()
End

End Sub

Private Sub cmdulang_Click()
txtha.SetFocus
txtha = “”
txtdis = “”
txtak = “”

End Sub

Private Sub txtha_Change()
If keyascii = 13 Then
txtdis = Val(txtha) * 0.1
txtak = Val(txtha) – Val(txtdis)
End If

End Sub

prhitungan pjk1.JPG

3.1
Private Sub cmdkeluar_Click()
End

End Sub

Private Sub cmdproses_Click()
txtGK = Val(txtGP) + Val(txtTU) – Val(txtPO)
txtPJK = Val(txtGK) * 0.1
txtGD = Val(txtGK) – Val(txtPJK)

End Sub

Private Sub cmdulang_Click()
txtGP.SetFocus
txtGP = “”
txtTU = “”
txtPO = “”
txtGK = “”
txtPJK = “”
txtGD = “”

End Sub

Private Sub txtGP_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTU.SetFocus
End If

End Sub

Private Sub txtTU_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPO.SetFocus
End If

End Sub

perhitunganpjk2.JPG

3.2
Private Sub cmdkeluar_Click()
End

End Sub

Private Sub cmdproses_Click()
txtGK = Val(txtGP) + Val(txtTU) – Val(txtPO)
txtPJK = Val(txtGK) * 0.1
txtGD = Val(txtGK) – Val(txtPJK)

End Sub

Private Sub cmdulang_Click()
txtGP.SetFocus
txtGP = “”
txtTU = “”
txtPO = “”
txtGK = “”
txtPJK = “”
txtGD = “”

End Sub

Private Sub txtGP_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTU.SetFocus
End If

End Sub

Private Sub txtPO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtGK = Val(txtGP) + Val(txtTU) – Val(txtPO)
txtPJK = Val(txtGK) * 0.1
txtGD = Val(txtGK) – Val(txtPJK)
End If

End Sub

Private Sub txtTU_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPO.SetFocus
End If

End Sub

 

Visual basic

Posted on Updated on

TUGAS 1

VB1

Program 1

Private Sub cmdbatal_Click()
Txtnpm.SetFocus
Txtnpm = “”
Txtnama = “”
Txtalamat = “”

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub Cmdlagi_click()
Txtnpm.SetFocus
Txtnpm = “”
Txtnama = “”
Txtalamat = “”

End Sub

Private Sub Txtnama_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtalamat.SetFocus
End If

End Sub

Private Sub Txtnpm_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtnama.SetFocus
End If

End Sub

VB2

Program 2

Private Sub cmdbatal_Click()
txtnpm.SetFocus
txtnpm = “”
txtnama = “”
txtalamat = “”
txtagama = “”
txtjeniskelamin = “”
txtnamaayah = “”
txtnamaibu = “”
txtpekerjaanayah = “”
txtpekerjaanibu = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub cmdlagi_Click()
txtnpm.SetFocus
txtnpm = “”
txtnama = “”
txtalamat = “”
txtagama = “”
txtjeniskelamin = “”
txtnamaayah = “”
txtnamaibu = “”
txtpekerjaanayah = “”
txtpekerjaanibu = “”

End Sub

Private Sub txtagama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjeniskelamin.SetFocus
End If

End Sub

Private Sub txtalamat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtagama.SetFocus
End If

End Sub

Private Sub txtjeniskelamin_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnamaayah.SetFocus
End If

End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtalamat.SetFocus
End If

End Sub

Private Sub txtnamaayah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnamaibu.SetFocus
End If

End Sub

Private Sub txtnamaibu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpekerjaanayah.SetFocus
End If

End Sub

Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If

End Sub

Private Sub txtpekerjaanayah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpekerjaanibu.SetFocus
End If

End Sub

VB3

Proram 3

Private Sub cmdbersih_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txthasil = “”

End Sub

Private Sub cmdhitung_Click()
txthasil = Val(txtn1) * Val(txtn2)

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If

End Sub
SRCVB4

Program 4

Private Sub cmdbersih_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txthasil = “”

End Sub

Private Sub cmdhitung_Click()
txthasil = Val(txtn1) * Val(txtn2)

End Sub

Private Sub cmdkeluar_Click()
Unload Me

End Sub

Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If

End Sub

Private Sub txtn2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txthasil = Val(txtn1) * Val(txtn2)
End If

End Sub

Diare karena Bakteri? Obatnya tak Selalu Antibiotik, Lho

Posted on

Ketika seseorang mengalami diare sekitar dua hingga tiga kali sehari, sudah pasti merasa panik dan segera mencari pertolongan utama dengan mengkonsumsi obat anti diare, termasuk obat antibiotik. Padahal menurut dr. Nurul Itqiyah Hariadi, MD, FAAP diare merupakan cara alami tubuh untuk membuang zat-zat beracun di dalam perut.

Dokter sekaligus relawan Yayasan Orang Tua Peduli ini mengungkapkan bahwa, diare sebaiknya ditangani dengan tidak segera menggunakan obat. Penanganan pertama yang harus dilakukan adalah memperhatikan asupan cairan yang diminum oleh orang tersebut.

“Manusia bisa hidup berhari-hari kalau tidak makan tapi, tidak bisa hidup lama kalau tidak minum. Sama halnya ketika seseorang terkena diare, penting  untuk tetap memberikan asupan minuman agar tidak dehidrasi. Untuk pertolongan utama sebaiknya pasien diberikan larutan oralit ketimbang obat,” ungkap Nurul dalam acara World Antibiotic Awareness Week di Jakarta, Kamis (12/11).

(baca: Daging Juga Baik Bagi Kesehatan Jantung)

Akan tetapi, selain pemberian asupan cairan hal lain yang tak kalah penting untuk diperhatikan adalah mengenali gejala diare. Apabila seseorang sudah mengalami diare berdarah hingga muntah-muntah maka harus segera ditangani oleh dokter.

“Biasanya kalau sudah diare akut seperti itu dokter memberikan tindakan infusan bukan malah memberikan obat antibiotik. Karena walau disebabkan oleh bakteri, diare belum tentu membutuhkan antibiotik,” tambahnya.

Untuk itu, ia mengimbau kepada seluruh masyarakat agar tetap bijak menggunakan obat antibiotik. Sebaiknya kenali dahulu penyebabnya, konsultasikan ke dokter dan jangan sembarangan membeli obat antibiotik di pasaran.

Sumber: http://gayahidup.republika.co.id/berita/gaya-hidup/info-sehat/15/11/13/nxqo6s328-diare-karena-bakteri-obatnya-tak-selalu-antibiotik-lho