Bahasa Pemrograman. Tugas8

RERE8

Private Sub Cmdbtl_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Cmdkeluar_Click()
Form1.Show
End Sub

Private Sub Cmdlg_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdproses_Click()
Dim S As String
Txtt.Text = Left(Txtnik, 4)
S = Mid(Txtnik, 5, 1)
If S = “A” Then
Txtgol = “A”
Txtj = “Manager”
Txtgp = “4000000”
Txttj = “1025000”
ElseIf S = “B” Then
Txtgol = “B”
Txtj = “Ka. Seksi”
Txtgp = “3500000”
Txttj = “975000”
ElseIf S = “C” Then
Txtgol = “C”
Txtj = “Staff”
Txtgp = “3000000”
Txttj = “925000”
End If
S = Right(Txtnik, 3)
If S = “KEU” Then
Txtb = “Accounting”
ElseIf S = “ADM” Then
Txtb = “Administrasi”
ElseIf S = “SDM” Then
Txtb = “General Affair”
ElseIf S = “EDP” Then
Txtb = “IT Unit”
ElseIf S = “SPM” Then
Txtb = “Security”
End If
S = Mid(Txtnik, 7, 1)
If S = “S” Then
Txtkode.Text = “S”
Txts.Text = “Single”
ElseIf S = “M” Then
Txtkode.Text = “M”
Txts.Text = “Menikah”
ElseIf S = “J” Then
Txtkode.Text = “J”
Txts.Text = “Janda”
ElseIf S = “D” Then
Txtkode.Text = “D”
Txts.Text = “Duda”
End If
Txttg = Val(Txtgp) + Val(Txttj)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

Private Sub Txtkaryawan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnik.SetFocus
End If
End Sub

^^FORM PILIHAN KELUAR

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Iklan
Standar

Bahasa Pemrograman. Tugas7

RERE7

Private Sub Cmdbtl_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Cmdkeluar_Click()
Form1.Show
End Sub

Private Sub Cmdlg_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdproses_Click()
Dim Judul, Peng, Pen, Harga As String
Txttt.Text = “20” & Mid(Txtkode, 5, 2)
s = Left(Txtkode, 3)
If s = “SIM” Then
Judul = “Sistem Informasi Manajemen”
Peng = “Fadiya Ulfa”
Harga = “75900”

ElseIf s = “EDP” Then
Judul = “Elektronik Data Processing”
Peng = “Nurul Agustina”
Harga = “62000”

ElseIf s = “MNJ” Then
Judul = “Manajemen”
Peng = “Rian Hidayat”
Harga = “42000”

ElseIf s = “CDR” Then
Judul = “Corel Draw”
Peng = “Siti Nur Khotimah”
Harga = “53000”

ElseIf s = “RPL” Then
Judul = “Rekayasa Perangkat Lunak”
Peng = “Winda Erlianti”
Harga = “83000”
End If
Txtjb = Judul
Txtpeng = Peng
Txth = Harga
s = Mid(Txtkode, 8)
If s = “A” Then
Pen = “Andi Offset Yogyakarta”
ElseIf s = “I” Then
Pen = “Indah Surabaya”
ElseIf s = “S” Then
Pen = “Salemba Empat”
ElseIf s = “E” Then
Pen = “Elek Media Komputindo”
ElseIf s = “M” Then
Pen = “Maxicom”
End If
Txtpen.Text = Pen
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

^^FORM PILIHAN KELUAR

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar

Bahasa Pemrograman. Tugas6

RERE6

Private Sub Cmdkel_Click()
Form1.Show
End Sub

Private Sub Cmdlg_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdproses_Click()
Dim Jk, Ht, Jb As String
I = Left(Txtkode, 3)
If I = “BIM” Then
Jk = “BIMA”
Ht = “50000”
Jb = “16.00”

ElseIf I = “EKO” Then
Jk = “EKONOMI”
Ht = “35000”
Jb = “19.00”
ElseIf I = “MUT” Then
Jk = “MUTIARA”
Ht = “23000”
Jb = “17.00”
ElseIf I = “SEN” Then
Jk = “SENJA”
Ht = “15000”
Jb = “20.00”
End If
Txtjk = Jk
Txtht = Ht
Txtjb = Jb
Txtjt.SetFocus
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

Private Sub Command2_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txttp = Val(Txtht) * Val(Txtjt)
End If
End Sub

^^FORM PILIHAN KELUAR

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar

Bahasa Pemrograman. Tugas5

RERE5

Private Sub Cmdbtl_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Cmdkel_Click()
Form1.Show
End Sub
Private Sub Cmdlg_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdproses_Click()
Dim JudulBuku, Pengarang, Penerbit, Harga As String
Txttb.Text = “20” & Right(Cbokode, 2)
s = Mid(Cbokode, 3, 3)
If s = “SIM” Then
JudulBuku = “Sistem Informasi Manajemen”
Pengarang = “Yati Nur Oktavia”
Harga = “75900”

ElseIf s = “EDP” Then
JudulBuku = “Elektronik Data Processing”
Pengarang = “Imam Tarmizi”
Harga = “62000”

ElseIf s = “MNJ” Then
JudulBuku = “Manajemen”
Pengarang = “Valentina Mariana Adiwianti”
Harga = “42000”

ElseIf s = “CDR” Then
JudulBuku = “Corel Draw”
Pengarang = “Riyan Suhandi”
Harga = “53000”

ElseIf s = “RPL” Then
JudulBuku = “Rekayasa Perangkat Lunak”
Pengarang = “Sinta Umpu Singa”
Harga = “83000”
End If
Txtjb = JudulBuku
Txtpeng = Pengarang
Txth = Harga
s = Mid(Cbokode, 1, 1)
If s = “A” Then
Penerbit = “Andi Offset Yogyakarta”
ElseIf s = “I” Then
Penerbit = “Indah Surabaya”
ElseIf s = “S” Then
Penerbit = “Salemba Empat”
ElseIf s = “E” Then
Penerbit = “Elek Media Komputindo”
ElseIf s = “M” Then
Penerbit = “Maxicom”
End If
Txtpen.Text = Penerbit
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
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

^^FORM PILIHAN KELUAR

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar

Bahasa Pemrograman. tugas4

4RERE

Private Sub Cbokode_Click()
Dim Jenis, satuan As Variant
Select Case Cbokode.Text
Case “P205”
Jenis = “Pentium II 500 Mega Hz”
satuan = 1500000
Case “P308”
Jenis = “Pentium III 800 Mega Hz ”
satuan = 2100000
Case “P310”
Jenis = “Pentium III 1.0 Giga Hz ”
satuan = 3500000
Case “P415”
Jenis = “Pentium IV 1.5 Giga Hz”
satuan = 4000000
Case “P417”
Jenis = “Pentium IV 1.7 Giga Hz ”
satuan = 4200000
Case “P419”
Jenis = “Pentium IV 1.9 Giga Hz”
satuan = 5500000
End Select
Txtjk.Text = Jenis
Txths.Text = satuan
End Sub

Private Sub Cmdhl_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdkeluar_Click()
Form1.Show
End Sub

Private Sub Cmdproses_click()
Dim HargaSatuan, Jumlah, Penjualan, Diskon, Bayar As Variant

Jumlah = Val(Txtjj)
HargaSatuan = Val(Txths)
Penjualan = HargaSatuan * Jumlah
Txthp = Penjualan
Select Case Penjualan
Case Is > 30000000
Diskon = Penjualan * 0.15
Case Is > 25000000
Diskon = Penjualan * 0.1
Case Is > 20000000
Diskon = Penjualan * 0.05
Case Is > 15000000
Diskon = Penjualan * 0.02
Case Is <= 150000000
Diskon = Penjualan * 0
End Select
Txtdis = Diskon

Bayar = Penjualan – Diskon
Txthb = Bayar
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

Private Sub Command2_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
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(Txtjj.Text) * Val(Txths.Text)
Select Case Txthp.Text
Case Is > 30000000
Txtdis = Val(Txthp) * 0.15
Case Is > 25000000
Txtdis = Val(Txthp) * 0.1
Case Is > 20000000
Txtdis = Val(Txthp) * 0.05
Case Is > 15000000
Txtdis = Val(Txthp) * 0.02
Case Is <= 150000000
Txtdis = Penjualan * 0
End Select
Txthb = Val(Txthp) – Val(Txtdis)
End If
End Sub

^^FORM PILIHAN KELUAR.

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar

Bahasa Pemrograman. Tugas 3

RERE2

Private Sub Cmdbatal_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Cmdkeluar_Click()
Form1.Show
End Sub

Private Sub Cmdlagi_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
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
Txtjr.Text = “sistem informasi”
ElseIf S = “2” Then
Txtjr.Text = “manajemen informatika”
ElseIf S = “3” Then
Txtjr.Text = “tekhnik informatika”
ElseIf S = “4” Then
Txtjr.Text = “Manajemen & Komp. Akuntansi”
End If
S = Mid(Txtnpm.Text, 4, 2)
If S = “00” 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
Txtnu.Text = Right(Txtnpm.Text, 3)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

Private Sub Form_activate()
Txtnm.SetFocus
Txtnm.Text = “”
Txtnpm.Text = “”
Txtjr.Text = “”
Txtps.Text = “”
Txttm.Text = “”
Txtnu.Text = “”
End Sub

Private Sub Txtnm_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtnpm.SetFocus
End If
End Sub

^^FORM PILIHAN KELUAR

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar

Bahasa Pemrograman. Tugas2

RERE2

Private Sub Cbokode_click()
Dim Merk, Harga, Kode As Variant

Kode = Mid(Cbokode.Text, 7, 5)
Select Case Kode
Case “MC965”
Merk = “Apple MC965 MacBook Air”
Harga = 12800000
Case “MC966”
Merk = “Apple MC966 MacBook Air”
Harga = 15800000
Case “MC968”
Merk = “Apple MC968 MacBook Air”
Harga = 9900000
Case “MC969”
Merk = “Apple MC969 MacBook Air”
Harga = 11900000
Case “MC700”
Merk = “Apple MC700 MacBook Pro”
Harga = 10800000
Case “MC721”
Merk = “Apple MC721 MacBook Pro”
Harga = 15900000
Case “MC723”
Merk = “Apple MC723 MacBook Pro”
Harga = 19300000
Case “MC724”
Merk = “Apple MC724 MacBook Pro”
Harga = 13700000
Case “MC311”
Merk = “Apple MC311 MacBook Pro”
Harga = 24200000
Case “MC313”
Merk = “Apple MC313 MacBook Pro”
Harga = 11900000
Case “MC314”
Merk = “Apple MC314 MacBook Pro”
Harga = 14700000
Case “MC318”
Merk = “Apple MC318 MacBook Pro”
Harga = 17600000
Case “MC322”
Merk = “Apple MC322 MacBook Pro”
Harga = 21300000
End Select
Txtmerk = Merk
Txths = Harga
End Sub

Private Sub Cmdhl_click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub

Private Sub Cmdkeluar_Click()
Form1.Show
End Sub

Private Sub Cmdproses_click()
Dim HS, Jual, Jumlah, Diskon, Total As Variant
HS = Val(Txths)
Jual = Val(Txtjj)
Jumlah = HS * Jual
Txthp = Jumlah

Select Case Jumlah
Case Is > 140000000
Diskon = Jumlah * 0.15
Case Is > 135000000
Diskon = Jumlah * 0.1
Case Is > 130000000
Diskon = Jumlah * 0.05
Case Is > 125000000
Diskon = Jumlah * 0.02
Case Is <= 125000000
Diskon = Jumlah * 0
End Select
Txtdis = Diskon

Total = Jumlah – Diskon
Txttb = Total
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveNext
End Sub

Private Sub Command2_Click()
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End Sub

Private Sub Form_Load()
Cbokode.AddItem “Apple MC965 MacBook Air”
Cbokode.AddItem “Apple MC966 MacBook Air”
Cbokode.AddItem “Apple MC968 MacBook Air”
Cbokode.AddItem “Apple MC969 MacBook Air”
Cbokode.AddItem “Apple MC700 MacBook Pro”
Cbokode.AddItem “Apple MC721 MacBook Pro”
Cbokode.AddItem “Apple MC723 MacBook Pro”
Cbokode.AddItem “Apple MC724 MacBook Pro”
Cbokode.AddItem “Apple MC311 MacBook Pro”
Cbokode.AddItem “Apple MC313 MacBook Pro”
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(Txtjj.Text) * Val(Txths.Text)
Select Case Txthp.Text
Case Is > 140000000
Txtdis = Val(Txthp) * 0.15
Case Is > 135000000
Txtdis = Val(Txthp) * 0.1
Case Is > 130000000
Txtdis = Val(Txthp) * 0.05
Case Is > 125000000
Txtdis = Val(Txthp) * 0.02
End Select
Txttb = Val(Txthp) – Val(Txtdis)
End If
End Sub

^^Form pilihan keluar

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Standar