Search

seltarinastmikpringsewu

Bahasa Pemrograman II

Database Mahasiswa

SELTA1

Private Sub Command1_Click()

Data1.Recordset.AddNew

Text1.SetFocus

End Sub

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

Private Sub Command4_Click()

End

End Sub

Advertisements

BAHASA PEMROGRAMAN DATABASE

PROGRAM 1

1

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

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

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

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnidn.SetFocus

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

PROGRAM 2

2

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

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

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

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

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

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

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

 

PROGRAM 3

3

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

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

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

 

TIPE A

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

form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtkt.SetFocus

txtkt.Text = “”

txtht.Text = “”

txtjk.Text = “”

txtjb.Text = “”

txtjt.Text = “”

txttotalp.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim JK As String

Dim HT, JB As Variant

A = Left(txtkt, 3)

If A = “BIM” Then

JK = “BIMA”

HT = “50000”

JB = “16.00”

ElseIf A = “EKO” Then

JK = “EKONOMI”

HT = “35000”

JB = “19.00”

ElseIf A = “MUT” Then

JK = “MUTIARA”

HT = “23000”

JB = “17.00”

ElseIf A = “SEN” Then

JK = “SENJA”

HT = “15.000”

JB = “20.00”

ElseIf KeyAscii = 13 Then

txtjt.SetFocus

End If

txtht = HT

txtjk = JK

txtjb = JB

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub txtjt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttotalp = Val(txtht) * Val(txtjt)

End If

End Sub

 

Private Sub txtkt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjt.SetFocus

End If

End Sub

 

TIPE B

B

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtkb.SetFocus

End Sub

 

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

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

txttahun.Text = “20” & Right(txtkb, 2)

S = Mid(txtkb, 3, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Andra Setiawan”

txthg.Text = “75900”

ElseIf S = “EDP” Then

txtjb.Text = “Elektronik Data Processing”

txtp.Text = “Desi Istiqomah”

txthg.Text = “62000”

ElseIf S = “MNJ” Then

txtjb.Text = “Manajemen”

txtp.Text = “Sandy Fitriajaya”

txthg.Text = “42000”

ElseIf S = “CDR” Then

txtjb.Text = “Corel Draw”

txtp.Text = “Tri Indah Sari”

txthg.Text = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Ernita Sari”

txthg.Text = “83000”

End If

S = Left(txtkb, 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 cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

TIPE C

C

 

Private Sub cbokode_Click()

Select Case cbokode.Text

Case “P205”

txtjk.Text = “pentiumII 500 Mega Hz”

txths.Text = “1500000”

Case “P308”

txtjk.Text = “pentiumIII 800 Mega Hz”

txths.Text = “2100000”

Case “P310”

txtjk.Text = “pentiumIII 1.0 Giga Hz”

txths.Text = “3500000”

Case “P415”

txtjk.Text = “pentiumIV 1.5 Giga Hz”

txths.Text = “4000000”

Case “P417”

txtjk.Text = “pentiumIV 1.7 Giga Hz”

txths.Text = “4200000”

Case “P419”

txtjk.Text = “pentiumIV 1.9 Giga Hz”

txths.Text = “5500000”

End Select

End Sub

 

 

Private Sub cmdproses_Click()

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

If txthp.Text > 30000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp.Text > 20000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp.Text > 15000000 Then

txtdis = Val(txthp) * 0.2

End If

txthb = Val(txthp) – Val(txtdis)

End Sub

 

Private Sub cmdhl_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txthb.Text = “”

End Sub

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub cmdclose_Click()

form2.Show

End Sub

 

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

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 txths_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjj.SetFocus

End If

End Sub

 

Private Sub txtjj_KeyPress(KeyAscii As Integer)

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

If txthp.Text > 30000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp.Text > 20000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp.Text > 15000000 Then

txtdis = Val(txthp) * 0.2

End If

txthb = Val(txthp) – Val(txtdis)

End Sub

 

TIPE D

D

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub cmdproses_Click()

Dim A, B, C, D As String

Dim H As Double

txttahun = “20” & Right(cbokode, 2)

A = Mid(cbokode, 3, 3)

If A = “SIM” Then

B = “SISTEM INFORMASI MANAJEMEN”

C = “YATI NUR OKTAVIA”

H = “75900”

ElseIf A = “MNJ” Then

B = “MANAJEMEN”

C = “VALENTINA MARIANA ADIWIANTI”

H = “42000”

ElseIf A = “EDP” Then

B = “ELECTRONIK DATA PROCESSING”

C = “IMAM TARMIZI”

H = “62000”

ElseIf A = “CDR” Then

B = “COREL DRAW”

C = “RIYAN SUHANDI”

H = “53000”

ElseIf A = “RPL” Then

B = “REKAYASA PERANGKAT LUNAK”

C = “SINTA UMPU SINGA”

H = “83000”

End If

txtjb.Text = B

txtp.Text = C

txthg.Text = H

D = Left(cbokode, 1)

If D = “A” Then

txtpenerbit.Text = “ANDY OFFSET YOGYAKARTA”

ElseIf D = “I” Then

txtpenerbit.Text = “INDAH SURABAYA”

ElseIf D = “M” Then

txtpenerbit.Text = “MAXICOM”

ElseIf D = “S” Then

txtpenerbit.Text = “SALEMBA EMPAT”

ElseIf D = “E” Then

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

End If

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode = “”

txtjb = “”

txtp = “”

txttt = “”

txtpenerbit = “”

txthg = “”

End Sub

 

Private Sub cmdbatal_Click()

cbokode.SetFocus

cbokode = “”

txtjb = “”

txtp = “”

txttt = “”

txtpenerbit = “”

txthg = “”

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

 

TIPE E

E

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtkb.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

 

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

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

txttahun.Text = “20” & Mid(txtkb, 5, 2)

S = Left(txtkb, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Fadiya 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 = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Winda Erlianti”

txthg.Text = “83000”

End If

S = Right(txtkb, 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

 

TIPE F

F

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdproses_Click()

txthp = Val(txtjj) * Val(txths)

If txthp > 140000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp > 135000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp > 130000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp > 125000000 Then

txtdis = Val(txthp) * 0.02

End If

txttb = Val(txthp) – Val(txtdis)

End Sub

 

 

Private Sub cmdhl_Click()

cbokode.SetFocus

cbokode = “”

txtmerk = “”

txths = “”

txtjj = “”

txthp = “”

txtdis = “”

txttb = “”

End Sub

 

Private Sub cmdkeluar_Click()

form2.Show

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 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 txtjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthp = Val(txtjj) * Val(txths)

If txthp > 140000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp > 135000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp > 130000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp > 125000000 Then

txtdis = Val(txthp) * 0.02

End If

txttb = Val(txthp) – Val(txtdis)

End If

End Sub

 

 

Private Sub cbokode_Click()

Select Case cbokode.Text

Case “ASUS A43SA”

txtmerk.Text = “VX090D”

txths = “5500000”

Case “ASUS A43SD”

txtmerk = “VX052D”

txths = “4500000”

Case “ASUS A43SJ”

txtmerk = “VX7792D”

txths = “4300000”

Case “ASUS A43TA”

txtmerk = “VX034D”

txths = “4900000”

Case “N43SL”

txtmerk = “VX264D”

txths = “4300000”

Case “Apple MD311”

txtmerk = “Apple MacBook Pro MD311”

txths = “19300000”

Case “Apple MD313”

txtmerk = “Apple MacBook Pro MD313”

txths = “24200000”

Case “Apple MD314”

txtmerk = “Apple MacBook Pro MD314”

txths = “11900000”

Case “Apple MD322”

txtmerk = “Apple MacBook Pro MD322”

txths = “14700000”

Case “Apple MC965”

txtmerk = “Apple MacBook Air MC965”

txths = “21300000”

End Select

End Sub

 

TIPE G

G

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txturut = “”

txtbp = “”

End Sub

 

Private Sub Cmdlagi_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txturut = “”

txtbp = “”

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”

txtps.Text = “strata satu”

txtbp.Text = “1.950.000”

ElseIf s = “2” Then

txtjur.Text = “tehnik informatika”

txtps.Text = “diploma empat”

txtbp.Text = “1.750.000”

ElseIf s = “3” Then

txtjur.Text = “manajemen informatika”

txtps.Text = “diploma tiga”

txtbp.Text = “1.650.000”

ElseIf s = “4” Then

txtjur.Text = “Manajemen & Komp.Akuntansi”

txtps.Text = “diploma dua”

txtbp.Text = “1.450.000”

End If

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

End Sub

 

TIPE H

H

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

cbokode.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdkeluar_Click()

form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub cbokode_Click()

Dim jk, hs, TB 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 Giga Hz”

hs = “3500000”

Case “P415”

jk = “Pentium IV 1.5 Giga Hz”

hs = “4000000”

Case “P417”

jk = “Pentium IV 1.7 Giga Hz”

hs = “4200000”

Case “P419”

jk = “Pentium IV 1.9 Giga Hz”

hs = “5500000”

End Select

txtjk.Text = jk

txths.Text = hs

txtjj.SetFocus

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

End Sub

 

Private Sub cmdproses_Click()

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

Select Case txthp.Text

Case Is > 40000000

txtdis = Val(txthp) * 0.15

Case Is > 35000000

txtdis = Val(txthp) * 0.1

Case Is > 30000000

txtdis = Val(txthp) * 0.05

Case Is > 25000000

txtdis = Val(txthp) * 0.02

End Select

txttb = Val(txthp) – Val(txtdis)

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 = Val(txths) * Val(txtjj)

Select Case txthp.Text

Case Is > 40000000

txtdis = Val(txthp) * 0.15

Case Is > 35000000

txtdis = Val(txthp) * 0.1

Case Is > 30000000

txtdis = Val(txthp) * 0.05

Case Is > 25000000

txtdis = Val(txthp) * 0.02

End Select

txttb = Val(txthp) – Val(txtdis)

End If

End Sub

 

TIPE I

I

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnk.SetFocus

End Sub

 

Private Sub cmdbatal_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtks = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotal = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtks = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotal = “”

End Sub

 

Private Sub cmdproses_Click()

Dim r As String

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

If r = “A” Then

txtgol = “A”

txtjbt.Text = “MANAGER”

txtgapok.Text = “4000000”

txttunjangan = “1025000”

ElseIf r = “B” Then

txtgol.Text = “B”

txtjbt.Text = “Ka.SEKSI”

txtgapok.Text = “3500000”

txttunjangan = “975000”

ElseIf r = “C” Then

txtgol.Text = “C”

txtjbt.Text = “STAFF”

txtgapok.Text = “3000000”

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

txtks.Text = kode

txtstatus.Text = Status

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

txttotal = Val(txtgapok) + Val(txttunjangan)

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

PROGRAM 13

J

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 = Val(txthb) * Val(txtjb)

If txtjb > 5 Then

txtpot = Val(txtby) * 0.02

End If

txttb = Val(txtby) – Val(txtpot)

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdproses_Click()

Dim s As String

s = Mid(txtkode, 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 = “Tip 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 cmdsave_Click()

Data1.Recordset.Update

End Sub

K

 

TIPE B

selta5

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtkb.SetFocus

End Sub

 

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

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

txttahun.Text = “20” & Right(txtkb, 2)

S = Mid(txtkb, 3, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Andra Setiawan”

txthg.Text = “75900”

ElseIf S = “EDP” Then

txtjb.Text = “Elektronik Data Processing”

txtp.Text = “Desi Istiqomah”

txthg.Text = “62000”

ElseIf S = “MNJ” Then

txtjb.Text = “Manajemen”

txtp.Text = “Sandy Fitriajaya”

txthg.Text = “42000”

ElseIf S = “CDR” Then

txtjb.Text = “Corel Draw”

txtp.Text = “Tri Indah Sari”

txthg.Text = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Ernita Sari”

txthg.Text = “83000”

End If

S = Left(txtkb, 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 cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

semay

 

BAHASA PEMROGRAMAN DATABASE

PROGRAM 1

SELTA2

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

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

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

 

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnidn.SetFocus

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

PROGRAM 2SELTA3

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

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

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

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

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

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

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

 

PROGRAM 3

selta4

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

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

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

 

TIPE A

SELTA1

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtkt.SetFocus

End Sub

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtkt.SetFocus

txtkt.Text = “”

txtht.Text = “”

txtjk.Text = “”

txtjb.Text = “”

txtjt.Text = “”

txttotalp.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim JK As String

Dim HT, JB As Variant

A = Left(txtkt, 3)

If A = “BIM” Then

JK = “BIMA”

HT = “50000”

JB = “16.00”

ElseIf A = “EKO” Then

JK = “EKONOMI”

HT = “35000”

JB = “19.00”

ElseIf A = “MUT” Then

JK = “MUTIARA”

HT = “23000”

JB = “17.00”

ElseIf A = “SEN” Then

JK = “SENJA”

HT = “15.000”

JB = “20.00”

ElseIf KeyAscii = 13 Then

txtjt.SetFocus

End If

txtht = HT

txtjk = JK

txtjb = JB

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub txtjt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttotalp = Val(txtht) * Val(txtjt)

End If

End Sub

 

Private Sub txtkt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjt.SetFocus

End If

End Sub

 

 

 

PROGRAM 1

1

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

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

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

 

PROGRAM 2

2

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

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

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

 

PROGRAM 3

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

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

 

TIPE A

A

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtkt.SetFocus

txtkt.Text = “”

txtht.Text = “”

txtjk.Text = “”

txtjb.Text = “”

txtjt.Text = “”

txttotalp.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim JK As String

Dim HT, JB As Variant

A = Left(txtkt, 3)

If A = “BIM” Then

JK = “BIMA”

HT = “50000”

JB = “16.00”

ElseIf A = “EKO” Then

JK = “EKONOMI”

HT = “35000”

JB = “19.00”

ElseIf A = “MUT” Then

JK = “MUTIARA”

HT = “23000”

JB = “17.00”

ElseIf A = “SEN” Then

JK = “SENJA”

HT = “15.000”

JB = “20.00”

ElseIf KeyAscii = 13 Then

txtjt.SetFocus

End If

txtht.Text = HT

txtjk.Text = JK

txtjb.Text = JB

End Sub

 

 

 

Private Sub txtjt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttotalp = Val(txtht) * Val(txtjt)

End If

End Sub

 

Private Sub txtkt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjt.SetFocus

End If

End Sub

 

TIPE B

B

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb.Text = “”

txtjb.Text = “”

txtp.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txthg.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

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

txttahun.Text = “20” & Right(txtkb, 2)

S = Mid(txtkb, 3, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Andra Setiawan”

txthg.Text = “75900”

ElseIf S = “EDP” Then

txtjb.Text = “lektronik Data Processing”

txtp.Text = “Desi Istiqomah”

txthg.Text = “62000”

ElseIf S = “MNJ” Then

txtjb.Text = “Manajemen”

txtp.Text = “Sandy Fitriajaya”

txthg.Text = “42000”

ElseIf S = “CDR” Then

txtjb.Text = “Corel Draw”

txtp.Text = “Tri Indah Sari”

txthg.Text = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Ernita Sari”

txthg.Text = “83000”

End If

S = Left(txtkb, 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

 

TIPE C

C

Private Sub cbokode_Click()

Select Case cbokode.Text

Case “P205”

txtjk.Text = “pentiumII 500 Mega Hz”

txths.Text = “1500000”

Case “P308”

txtjk.Text = “pentiumIII 800 Mega Hz”

txths.Text = “2100000”

Case “P310”

txtjk.Text = “pentiumIII 1.0 Giga Hz”

txths.Text = “3500000”

Case “P415”

txtjk.Text = “pentiumIV 1.5 Giga Hz”

txths.Text = “4000000”

Case “P417”

txtjk.Text = “pentiumIV 1.7 Giga Hz”

txths.Text = “4200000”

Case “P419”

txtjk.Text = “pentiumIV 1.9 Giga Hz”

txths.Text = “5500000”

End Select

End Sub

 

 

Private Sub cmbproses_Click()

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

If txthp.Text > 30000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp.Text > 20000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp.Text > 15000000 Then

txtdis = Val(txthp) * 0.2

End If

txthb = Val(txthp) – Val(txtdis)

End Sub

 

Private Sub cmdhl_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txthb.Text = “”

End Sub

 

Private Sub cmdclose_Click()

End

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 txths_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjj.SetFocus

End If

End Sub

 

Private Sub txtjj_KeyPress(KeyAscii As Integer)

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

If txthp.Text > 30000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp.Text > 20000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp.Text > 15000000 Then

txtdis = Val(txthp) * 0.2

End If

txthb = Val(txthp) – Val(txtdis)

End Sub

 

TIPE D

D

Private Sub cmdproses_Click()

Dim A, B, C, D As String

Dim H As Double

txttt = “20” & Right(cbokode, 2)

A = Mid(cbokode, 3, 3)

If A = “SIM” Then

B = “SISTEM INFORMASI MANAJEMEN”

C = “YATI NUR OKTAVIA”

H = “75900”

ElseIf A = “MNJ” Then

B = “MANAJEMEN”

C = “VALENTINA MARIANA ADIWIANTI”

H = “42000”

ElseIf A = “EDP” Then

B = “ELECTRONIK DATA PROCESSING”

C = “IMAM TARMIZI”

H = “62000”

ElseIf A = “CDR” Then

B = “COREL DRAW”

C = “RIYAN SUHANDI”

H = “53000”

ElseIf A = “RPL” Then

B = “REKAYASA PERANGKAT LUNAK”

C = “SINTA UMPU SINGA”

H = “83000”

End If

txtjb.Text = B

txtp.Text = C

txthg.Text = H

D = Left(cbokode, 1)

If D = “A” Then

txtpenerbit.Text = “ANDY OFFSET YOGYAKARTA”

ElseIf D = “I” Then

txtpenerbit.Text = “INDAH SURABAYA”

ElseIf D = “M” Then

txtpenerbit.Text = “MAXICOM”

ElseIf D = “S” Then

txtpenerbit.Text = “SALEMBA EMPAT”

ElseIf D = “E” Then

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

End If

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode = “”

txtjb = “”

txtp = “”

txttt = “”

txtpenerbit = “”

txthg = “”

End Sub

 

Private Sub cmdbatal_Click()

cbokode.SetFocus

cbokode = “”

txtjb = “”

txtp = “”

txttt = “”

txtpenerbit = “”

txthg = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

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

 

TIPE E

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

End

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

txttahun.Text = “20” & Mid(txtkb, 5, 2)

S = Left(txtkb, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtp.Text = “Fadiya 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 = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtp.Text = “Winda Erlianti”

txthg.Text = “83000”

End If

S = Right(txtkb, 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

 

TIPE F

F

Private Sub cmdproses_Click()

txthp = Val(txtjj) * Val(txths)

If txthp > 140000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp > 135000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp > 130000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp > 125000000 Then

txtdis = Val(txthp) * 0.02

End If

txttb = Val(txthp) – Val(txtdis)

End Sub

 

 

Private Sub cmdhl_Click()

txtkode.SetFocus

txtkode = “”

txtmerk = “”

txths = “”

txtjj = “”

txthp = “”

txtdis = “”

txttb = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

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 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 txtjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthp = Val(txtjj) * Val(txths)

If txthp > 140000000 Then

txtdis = Val(txthp) * 0.15

ElseIf txthp > 135000000 Then

txtdis = Val(txthp) * 0.1

ElseIf txthp > 130000000 Then

txtdis = Val(txthp) * 0.05

ElseIf txthp > 125000000 Then

txtdis = Val(txthp) * 0.02

End If

txttb = Val(txthp) – Val(txtdis)

End If

End Sub

 

 

Private Sub cbokode_Click()

Select Case cbokode.Text

Case “ASUS A43SA”

txtmerk.Text = “VX090D”

txths = “5500000”

Case “ASUS A43SD”

txtmerk = “VX052D”

txths = “4500000”

Case “ASUS A43SJ”

txtmerk = “VX7792D”

txths = “4300000”

Case “ASUS A43TA”

txtmerk = “VX034D”

txths = “4900000”

Case “N43SL”

txtmerk = “VX264D”

txths = “4300000”

Case “Apple MD311”

txtmerk = “Apple MacBook Pro MD311”

txths = “19300000”

Case “Apple MD313”

txtmerk = “Apple MacBook Pro MD313”

txths = “24200000”

Case “Apple MD314”

txtmerk = “Apple MacBook Pro MD314”

txths = “11900000”

Case “Apple MD322”

txtmerk = “Apple MacBook Pro MD322”

txths = “14700000”

Case “Apple MC965”

txtmerk = “Apple MacBook Air MC965”

txths = “21300000”

End Select

End Sub

 

TIPE G

G

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txturut = “”

txtbp = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtps = “”

txttm = “”

txturut = “”

txtbp = “”

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”

txtps.Text = “strata satu”

txtbp.Text = “1.950.000”

ElseIf s = “2” Then

txtjur.Text = “tehnik informatika”

txtps.Text = “diploma empat”

txtbp.Text = “1.750.000”

ElseIf s = “3” Then

txtjur.Text = “manajemen informatika”

txtps.Text = “diploma tiga”

txtbp.Text = “1.650.000”

ElseIf s = “4” Then

txtjur.Text = “Manajemen & Komp.Akuntansi”

txtps.Text = “diploma dua”

txtbp.Text = “1.450.000”

End If

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

End Sub

 

TIPE H

H

Private Sub cbokode_Click()

Dim jk, hs, TB 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 Giga Hz”

hs = “3500000”

Case “P415”

jk = “Pentium IV 1.5 Giga Hz”

hs = “4000000”

Case “P417”

jk = “Pentium IV 1.7 Giga Hz”

hs = “4200000”

Case “P419”

jk = “Pentium IV 1.9 Giga Hz”

hs = “5500000”

End Select

txtjk.Text = jk

txths.Text = hs

txtjj.SetFocus

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

txttb.Text = “”

End Sub

 

Private Sub cmdproses_Click()

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

Select Case txthp.Text

Case Is > 40000000

txtdis = Val(txthp) * 0.15

Case Is > 35000000

txtdis = Val(txthp) * 0.1

Case Is > 30000000

txtdis = Val(txthp) * 0.05

Case Is > 25000000

txtdis = Val(txthp) * 0.02

End Select

txttb = Val(txthp) – Val(txtdis)

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 = Val(txths) * Val(txtjj)

Select Case txthp.Text

Case Is > 40000000

txtdis = Val(txthp) * 0.15

Case Is > 35000000

txtdis = Val(txthp) * 0.1

Case Is > 30000000

txtdis = Val(txthp) * 0.05

Case Is > 25000000

txtdis = Val(txthp) * 0.02

End Select

txttb = Val(txthp) – Val(txtdis)

End If

End Sub

 

TIPE I

I

Private Sub cmdbatal_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtks = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotal = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnk.SetFocus

txtnk = “”

txtnik = “”

txtgol = “”

txtks = “”

txtstatus = “”

txttahun = “”

txtjbt = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotal = “”

End Sub

 

Private Sub cmdproses_Click()

Dim r As String

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

If r = “A” Then

txtgol = “A”

txtjbt.Text = “MANAGER”

txtgapok.Text = “4000000”

txttunjangan = “1025000”

ElseIf r = “B” Then

txtgol.Text = “B”

txtjbt.Text = “Ka.SEKSI”

txtgapok.Text = “3500000”

txttunjangan = “975000”

ElseIf r = “C” Then

txtgol.Text = “C”

txtjbt.Text = “STAFF”

txtgapok.Text = “3000000”

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

txtks.Text = kode

txtstatus.Text = Status

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

txttotal = Val(txtgapok) + Val(txttunjangan)

End Sub

 

 

 

Data Nama

selta3

Private Sub Check1_Click()

Label2.FontBold = Check1.Value

End Sub

 

Private Sub Check2_Click()

Label2.FontItalic = Check2.Value

End Sub

 

Private Sub Command1_Click()

Label2.Caption = “SELTARINA”

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

Private Sub Option1_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub Option2_Click()

Label2.ForeColor = vbRed

End Sub

 

Huruf Mutu

selta2

Private Sub cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case cbonpm.Text

Case “15100201”

nama = “AFRIZA UTAMA”

jurusan = “sistem informasi”

Case “15100120”

nama = “A.N IMAM BUCHORI”

jurusan = “manajemen informatika”

Case “15100197”

nama = “AGUNG PRAMUDI”

jurusan = “sistem informasi”

Case “15100196”

nama = “ALI MARWAN”

jurusan = “sistem informasi”

Case “15100140”

nama = “ANDI SUCIPTO”

jurusan = “manajemen informatika”

Case “15100125”

nama = “ANDRI AGUNG DWI SAPUTRA”

jurusan = “sistem informasi”

Case “15100203”

nama = “ARGA PURNAMA AJI”

jurusan = “manajemen informatika”

Case “15100121”

nama = “AYU ALFANI”

jurusan = “sistem informasi”

Case “15100135”

nama = “AYU KRISMIATI”

jurusan = “sistem informasi”

Case “15100127”

nama = “BAYU EKA ALFIANTO”

jurusan = “sistem informasi”

Case “15100199”

nama = “BAYU PRABOWO”

jurusan = “manajemen informatika”

Case “15201018”

nama = “DESI IRSANTI”

jurusan = “sistem informasi”

Case “15100122”

nama = “DIAN SAPUTRA”

jurusan = “sistem informasi”

Case “15100130”

nama = “DIKI DIANTORO”

jurusan = “sistem informasi”

Case “15100118”

nama = “ERLANGGA NURFERNANDO”

jurusan = “manajemen informatika”

Case “15100126”

nama = “ERMA DWIYANI”

jurusan = “manajemen informatika”

Case “15100116”

nama = “FAQIHUDDIN”

jurusan = “sistem informasi”

Case “15100138”

nama = “FEBRI ARIYANTO”

jurusan = “sistem informasi”

Case “15100198”

nama = “FEBRIANSYAH”

jurusan = “manajemen informatika”

Case “15100128”

nama = “HASAN HAFIDIN”

jurusan = “sistem informasi”

Case “15100124”

nama = “ITA FIBRIYANTI”

jurusan = “sistem informasi”

Case “15100131”

nama = “KUKUH PRASETYO”

jurusan = “manajemen informatika”

Case “15100139”

nama = “M. ARYA BIMO RIFKI”

jurusan = “manajemen informatika”

Case “15100123”

nama = “MAD MUHAIDI”

jurusan = “manajemen informatika”

Case “15100136”

nama = “MAR’ATUS SHOLEHAH”

jurusan = “sistem informasi”

Case “15100117”

nama = “MAYMANAH”

jurusan = “sistem informasi”

Case “15100202”

nama = “RINANDA”

jurusan = “sistem informasi”

Case “15100133”

nama = “RISKI SAFITRA RAMADON”

jurusan = “manajemen informatika”

Case “15100195′”

nama = “RULLY INDRIANTO”

jurusan = “manajemen informatika”

Case “15100132”

nama = “SELTARINA”

jurusan = “sistem informasi”

Case “15100206”

nama = “SITI MUKODIMAH”

jurusan = “sistem informasi”

Case “15100205”

nama = “SUPRAPTI”

jurusan = “manajemen informatika”

Case “13100457”

nama = “SUSANTO”

jurusan = “manajemen informatika”

Case “15100137”

nama = “TIARA HERMADITA”

jurusan = “sistem informasi”

Case “15100134”

nama = “WAHYU CANDRA WIJAYA”

jurusan = “sistem informasi”

Case “15100129”

nama = “YELI FITRI LIANUARI”

jurusan = “manajemen informatika”

Case “15100119”

nama = “YUDA FERDIANTARA”

jurusan = “sistem informasi”

 

End Select

jurusan = “managemen”

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

 

Private Sub Cmdbatal_Click()

cbonpm.SetFocus

cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txtna.Text = “”

txthm.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(txtquis.Text)

TUGAS = Val(txttugas.Text)

UTS = Val(txtuts.Text)

UAS = Val(txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

txtna.Text = NA

 

Select Case txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

txthm.Text = HM

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

 

 

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

 

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuts.SetFocus

End If

End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

End Sub

Private Sub Form_Load()

cbonpm.AddItem “15100201”

cbonpm.AddItem “15100120”

cbonpm.AddItem “15100197”

cbonpm.AddItem “15100196”

cbonpm.AddItem “15100140”

cbonpm.AddItem “15100125”

cbonpm.AddItem “15100203”

cbonpm.AddItem “15100121”

cbonpm.AddItem “15100135”

cbonpm.AddItem “15100127”

cbonpm.AddItem “15100199”

cbonpm.AddItem “15201018”

cbonpm.AddItem “15100122”

cbonpm.AddItem “15100130”

cbonpm.AddItem “15100118”

cbonpm.AddItem “15100126”

cbonpm.AddItem “15100116”

cbonpm.AddItem “15100138”

cbonpm.AddItem “15100198”

cbonpm.AddItem “15100128”

cbonpm.AddItem “15100124”

cbonpm.AddItem “15100131”

cbonpm.AddItem “15100139”

cbonpm.AddItem “15100123”

cbonpm.AddItem “15100136”

cbonpm.AddItem “15100117”

cbonpm.AddItem “15100202”

cbonpm.AddItem “15100133”

cbonpm.AddItem “15100195′”

cbonpm.AddItem “15100132”

cbonpm.AddItem “15100206”

cbonpm.AddItem “15100205”

cbonpm.AddItem “13100457”

cbonpm.AddItem “15100137”

cbonpm.AddItem “15100134”

cbonpm.AddItem “15100129”

cbonpm.AddItem “15100119”

 

End Sub

 

 

Visual Basic

selta1

Private Sub optgreen_Click()

‘membuat teks berwarna hijau

lblteks.ForeColor = vbGreen

End Sub

Private Sub optblue_Click()

‘Membuat teks berwarna biru

lblteks.ForeColor = vbBlue

End Sub

 

Private Sub optRed_Click()

‘Membuat teks bewarna merah

lblteks.ForeColor = vbRed

End Sub

 

Private Sub optyellow_Click()

‘membuat teks berwarna kuning

lblteks.ForeColor = vbYellow

End Sub

Private Sub chkBold_Click()

‘Membuat teks Tebal

If ChkBold.Value = 1 Then

lbltext.FontBold = True

Else

lblteks.FontBold = False

End If

End Sub

 

Private Sub chkitalic_Click()

‘membuat teks miring

If ChkItalic.Value = 1 Then

lblteks.FontItalic = True

Else

lblteks.FontItalic = False

 

End If

End Sub

 

Private Sub chkstrikeout_Click()

‘Membuat teks garis tengah

If ChkStrike.Value = 1 Then

lblteks.Fontstrikeout = True

Else

lblteks.Fontstrikeout = False

 

End If

End Sub

 

Private Sub chkunderline_Click()

‘Membuat teks garis bawah

If ChkUnder.Value = 1 Then

lblteks.Fontunder = True

Else

lblteks.Fontunder = False

 

End If

End Sub

Private Sub cmdexit_Click()

End

End Sub

APLIKASI PERHITUNGAN GAJI

3

3.2

Private Sub cmdhitung_Click()

txtgp = Val(txtgp) + (txttj) + (txtpt)

txtpjk = Val(txtgk) * 0.1

txtgd = Val(txtgk) – Val(txtpjk)

 

End Sub

 

Private Sub cmdulang_Click()

txtgp.SetFocus

txtgp = “”

txttj = “”

txtpot = “”

txtgk = “”

txtpjk = “”

txtgd = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub txtgd_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

End If

 

End Sub

 

Create a free website or blog at WordPress.com.

Up ↑