tugas database

Program 1

YELI1

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

program 2

YELI2

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

program 3

YELI3

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE A

YELIA

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

 

Ketika di klik keluar maka :

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE B

YELIB

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE C

YELIC

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE D

YELID

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE E

YELIE

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE F

YELIF

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE G

YELIG

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE H

YELIH

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

TIPE I

YELII

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

 

Ketika di klik keluar maka :

Copy of keluar

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

 

 

PROGRAM 13

YELIJ

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

 

Ketika di klik keluar maka :

YELIT

Private Sub Command1_Click()

End

End Sub

 

Private Sub Command2_Click()

Form1.Show

End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s