SlideShare a Scribd company logo
1 of 12
Download to read offline
Di Susun Oleh
Agus Muhardi, A.Md
Jurusan Komputerisasi Akuntansi dan Manajeman Informatika
BINA SARANA INFORMATIKA DAN KOMPUTER
Tangerang 2005
2
Kunci Jawaban Soal Latihan Pra UAS Tipe A
Objek-objek yang terkait:
Objeck Properties Nilai
Form1 Caption Alga Musa
Data1 Name
Caption
Database Name
Recordset Type
Record Source
Toko
Data Toko
Cari Difolder Masing2
0-Table
Tbl_Toko
Label1 Caption Toko Alat Tulis Alga Musa
Label2 Caption Nama Barang
Label3 Caption Harga Barang
Label4 Caption Jumlah Barang
Label5 Caption Bayar
Label6 Caption Potongan
Label7 Caption Total Bayar
Text1 Name
DataSource
DataField
Text
Txtnama
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text2 Name
DataSource
DataField
Text
Txtharga
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text3 Name
DataSource
DataField
Text
Txtjumlah
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text4 Name
DataSource
DataField
Text
Txtbayar
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text5 Name
DataSource
DataField
Text
Txtpot
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text6 Name
DataSource
DataField
Text
Txttotal
Toko
Sesuaikan dengan fieldnya masing2
<Kosongkan>
3
Frame1 Caption Tombol Operasi
CommandButton1 Name
Caption
Cmdadd
&ADD
CommandButton2 Name
Caption
Cmdcancel
&CANCEL
CommandButton3 Name
Caption
Cmdsave
&SAVE
CommandButton4 Name
Caption
Cmdhitung
&HITUNG
CommandButton5 Name
Caption
Cmdexit
E&XIT
Dbgrid1 Caption
DataSource
DATA TRANSAKSI
Toko
Listing Programnya:
Private Sub cmdadd_Click()
tambah = True
toko.Recordset.AddNew
txtnama.SetFocus
End Sub
Private Sub cmdcancel_Click()
toko.Recordset.CancelUpdate
toko.Recordset.MoveLast
End Sub
Private Sub cmdexit_Click()
psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi")
If psn = vbYes Then
MsgBox "Makasih Yach.........", 32, "informasi"
End
Else
If psn = vbNo Then
MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi"
End If
End If
End Sub
Private Sub cmdlagi_Click()
dbbio.Recordset.MoveNext
If dbbio.Recordset.EOF Then
dbbio.Recordset.MoveLast
MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi"
End If
End Sub
Private Sub cmdhitung_Click()
txtbayar.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
If txtjumlah > 5 Then
txtpot.Text = 2 / 100 * Val(txtbayar.Text)
txttotal.Text = Val(txtbayar.Text) - Val(txtpot.Text)
Else
txtpot.Text = 0
txttotal = Val(txtbayar.Text) - Val(txtpot.Text)
End If
End Sub
Private Sub cmdsave_Click()
If tambah = True Then
toko.Recordset.Update
Else
toko.Recordset.Update
End If
End Sub
Private Sub Form_Load()
tambah = False
End Sub
Private Sub txtharga_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjumlah.SetFocus
End If
End Sub
Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdhitung.SetFocus
End If
End Sub
Private Sub txtnama_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then
txtharga.SetFocus
End If
End Sub
4
Kunci Jawaban Soal Latihan Pra UAS Tipe B
Objek-objek yang terkait :
Objeck Properties Nilai
Form1 Caption Alga Musa
Data1 Name
Caption
Database Name
Recordset Type
Record Source
Data1
Data Musik
Cari Difolder Masing2
0-Table
Tbl_Musik
Data2 Name
Caption
Database Name
Recordset Type
Record Source
Data2
Data Film
Cari Difolder Masing2
1-Dynaset
Tbl_Film
Label1 Caption Toko VCD Alga Musa
Frame1 Caption Musik
Label2 Caption Jenis Musik
Label3 Caption Harga
Label4 Caption Jumlah Beli
Text1 Name
DataSource
DataField
Text
Text1
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text2 Name
DataSource
DataField
Text
Text2
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text3 Name
DataSource
DataField
Text
Text3
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Frame2 Caption Film
Label5 Caption Jenis Film
Label6 Caption Harga
Label7 Caption Jumlah Beli
Text4 Name
DataSource
DataField
Text
Text4
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
5
Text5 Name
DataSource
DataField
Text
Text5
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text6 Name
DataSource
DataField
Text
Text6
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
CommandButton1 Name
Caption
Cmdback
BACK
CommandButton2 Name
Caption
Cmdnext
NEXT
CommandButton3 Name
Caption
Cmdcarimusik
CARI JENIS MUSIK
CommandButton4 Name
Caption
Cmdback1
BACK
CommandButton5 Name
Caption
Cmdnext1
NEXT
CommandButton6 Name
Caption
Cmdcarifilm
CARI JENIS FILM
Frame3 Caption Transaksi Pembayaran
Label8 Caption Total Bayar
Label9 Caption Uang Bayar
Label10 Caption Uang Kembali
Text7 Name
Text
Text7
<Kosongkan>
Text8 Name
Text
Text8
<Kosongkan>
Text9 Name
Text
Text9
<Kosongkan>
CommandButton8 Name
Caption
Cmdhitung
HITUNG
CommandButton9 Name
Caption
Cmdkeluar
KELUAR
Listing Programnya:
Dim bayar As Long
Private Sub cmdback_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
MsgBox "Sudah Diawal Record Adek", "16", "Informasi"
End If
End Sub
Private Sub cmdcarifilm_Click()
Dim soraya As String * 5
Dim lusiana As String
soraya = InputBox("Ketik Kode Musik:", "Pencarian Biodata")
lusiana = "kd_film ='" & soraya & "'"
Data2.Recordset.FindFirst lusiana
If Data2.Recordset.NoMatch Then
MsgBox "Maaf Mas Kode Musik " + soraya + " tidk ada", 16, "informasi"
Data2.Recordset.MoveFirst
End If
End Sub
Private Sub cmdcarimusuk_Click()
Dim soraya As String * 5
soraya = InputBox("Ketik Kode Musik:", "Pencarian Biodata")
alga_musa = "kd_musik '" & soraya & "'"
Data1.Recordset.Index = "kdmusik"
Data1.Recordset.Seek "=", soraya
If Data1.Recordset.NoMatch Then
MsgBox "Maaf Mas Kode Musik " + soraya + " tidk ada", 16, "informasi"
Data1.Recordset.MoveFirst
End If
End Sub
6
Private Sub cmdhitung_Click()
bayar = Val(Text2.Text) * Val(Text3.Text) + Val(Text5.Text) * Val(Text6.Text)
Text7 = Format(bayar, " Rp ###,###,###") & ",-"
End Sub
Private Sub cmdkeluar_Click()
psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi")
If psn = vbYes Then
MsgBox "Makasih Yach.........", 32, "informasi"
End
Else
If psn = vbNo Then
MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi"
End If
End If
End Sub
Private Sub cmdnext_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi"
End If
End Sub
Private Sub cmdnext1_Click()
Data2.Recordset.MoveNext
If Data2.Recordset.EOF Then
Data2.Recordset.MoveLast
MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi"
End If
End Sub
Private Sub cmdback1_Click()
Data2.Recordset.MovePrevious
If Data2.Recordset.BOF Then
Data2.Recordset.MoveFirst
MsgBox "Sudah Diawal Record Adek", "16", "Informasi"
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdhitung.SetFocus
End If
End Sub
Private Sub Text8_Change()
On Error Resume Next
Text9.Text = Format(Text8.Text - bayar, " Rp ###,###,###") & ",-"
End Sub
7
Kunci Jawaban Soal Latihan Pra UAS Tipe C
Objek-objek yang terkait :
Objeck Properties Nilai
Form1 Caption Alga Musa
Label1 Caption Café Alga Musa
Data1 Name
Caption
Database Name
Recordset Type
Record Source
Data1
Data Makan
Cari Difolder Masing2
0-Table
Tbl_Makan
Data2 Name
Caption
Database Name
Recordset Type
Record Source
Data2
Data Minum
Cari Difolder Masing2
0-Table
Tbl_Minum
Dbgrid1 Caption
DataSource
Menu Pempek
Data1
Dbgrid2 Caption
DataSource
Menu Minuman
Data2
Frame1 Caption Pesanan Pempek
Label2 Caption Nama Makanan
Label3 Caption Harga
Label4 Caption Jumlah Porsi
Text1 Name
DataSource
DataField
Text
Text1
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text2 Name
DataSource
DataField
Text
Text2
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text3 Name
DataSource
DataField
Text
Text3
Data1
Sesuaikan dengan fieldnya masing2
<Kosongkan>
8
Frame2 Caption Pesanan Minuman
Label5 Caption Nama Minuman
Label6 Caption Harga
Label7 Caption Jumlah Porsi
Text4 Name
DataSource
DataField
Text
Text4
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text5 Name
DataSource
DataField
Text
Text5
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text6 Name
DataSource
DataField
Text
Text6
Data2
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Frame3 Caption Data Transaksi
Label8 Caption Total Bayar
Label9 Caption Uang Bayar
Label10 Caption Kembali
Text7 Name
Text
Text7
<Kosongkan>
Text8 Name
Text
Text8
<Kosongkan>
Text9 Name
Text
Text9
<Kosongkan>
CommandButton8 Name
Caption
Cmdhitung
HITUNG
CommandButton9 Name
Caption
Cmdkeluar
KELUAR
Listing Programnya:
Private Sub cmdhitung_Click()
bayar = Val(Text2.Text) * Val(Text3.Text) + Val(Text5.Text) * Val(Text6.Text)
Text7.Text = Format(bayar, " Rp ###,###,###") & ",-"
End Sub
Private Sub cmdkeluar_Click()
psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi")
If psn = vbYes Then
MsgBox "Makasih Yach.........", 32, "informasi"
End
Else
If psn = vbNo Then
MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi"
End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdhitung.SetFocus
End If
End Sub
Private Sub Text8_Change()
On Error Resume Next
Text9.Text = Format(Text8.Text - bayar, " Rp ###,###,###") & ",-"
End Sub
9
Kunci Jawaban Soal Latihan Pra UAS Tipe D
Objek-objek yang terkait :
Objeck Properties Nilai
Form1 Caption Alga Musa Motor
Label1 Caption Alga Musa Motor
Data1 Name
Caption
Database Name
Recordset Type
Record Source
Motor
Data Motor
Cari Difolder Masing2
0-Table
Tbl_Motor
Frame1 Caption Honda
Option1 Caption SPR
Option2 Caption KRM
Option3 Caption LGD
Option4 Caption WIN
Frame2 Caption Suzuki
Option5 Caption SMH
Option6 Caption SGN
Option7 Caption STR
Frame3 Caption Yamaha
Option8 Caption FGR
Option9 Caption JPR
Option10 Caption RXK
Frame4 Caption Data Transaksi
Label2 Caption Jenis Motor
Label3 Caption Harga Motor
Label4 Caption Jumlah Beli
Label5 Caption Bayar
Label6 Caption Potongan
Label7 Caption Total Bayar
10
Text1 Name
DataSource
DataField
Text
txtjenis
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text2 Name
DataSource
DataField
Text
txtharga
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text3 Name
DataSource
DataField
Text
txtjumlah
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text4 Name
DataSource
DataField
Text
txtbayar
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text5 Name
DataSource
DataField
Text
txtpotong
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
Text6 Name
DataSource
DataField
Text
txttotal
Motor
Sesuaikan dengan fieldnya masing2
<Kosongkan>
CommandButton1 Name
Caption
Cmdtambah
TAMBAH
CommandButton2 Name
Caption
Cmdsimpan
SIMPAN
CommandButton3 Name
Caption
Cmdbatal
BATAL
CommandButton4 Name
Caption
Cmdhitung
HITUNG
CommandButton5 Name
Caption
Cmdkeluar
KELUAR
Dbgrid1 Caption
DataSource
DATA TRANSAKSI
Motor
Listing Programnya:
Private Sub cmdbatal_Click()
motor.Recordset.CancelUpdate
motor.Recordset.MoveLast
End Sub
Private Sub cmdhitung_Click()
txtbayar.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
If txtjumlah > 5 Then
txtpotong.Text = 2 / 100 * Val(txtbayar.Text)
txttotal.Text = Val(txtbayar.Text) - Val(txtpotong.Text)
Else
txtpotong.Text = 0
txttotal = Val(txtbayar.Text) - Val(txtpotong.Text)
End If
End Sub
Private Sub cmdkeluar_Click()
psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi")
If psn = vbYes Then
MsgBox "Makasih Yach.........", 32, "informasi"
End
Else
If psn = vbNo Then
MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi"
End If
End If
End Sub
11
Private Sub cmdsimpan_Click()
If tambah = True Then
motor.Recordset.Update
Else
motor.Recordset.Update
End If
End Sub
Private Sub cmdtambah_Click()
tambah = True
motor.Recordset.AddNew
txtjenis.SetFocus
End Sub
Private Sub Form_Load()
tambah = False
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option1_Click()
txtjenis.Text = "Supra"
txtharga.Text = 8000000
txtjumlah.SetFocus
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option10_Click()
txtjenis.Text = "Jupiter"
txtharga.Text = 10000000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option11.Value = False
End Sub
Private Sub Option11_Click()
txtjenis.Text = "RX King"
txtharga.Text = 15000000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
End Sub
Private Sub Option2_Click()
txtjenis.Text = "Karisma"
txtharga.Text = 8500000
txtjumlah.SetFocus
Option1.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option3_Click()
txtjenis.Text = "Lagenda"
txtharga.Text = 8560000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option4_Click()
txtjenis.Text = "Honda Win"
txtharga.Text = 7500000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option5_Click()
txtjenis.Text = "Smesh"
txtharga.Text = 6500000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option6.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option6_Click()
txtjenis.Text = "Sohgon"
txtharga.Text = 7800000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option7.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
12
Private Sub Option7_Click()
txtjenis.Text = "Satria"
txtharga.Text = 13000000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub Option9_Click()
txtjenis.Text = "Vega R"
txtharga.Text = 12000000
txtjumlah.SetFocus
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option10.Value = False
Option11.Value = False
End Sub
Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdhitung.SetFocus
End If
End Sub
Prakata
Puji Syukur kami ucapkan kepada Allah S.W.T yang telah
memberikan nikmat kesehatan sehingga kami mampu
menyelesaikan materi Microsoft Visula Basic ini dan ucapan
terima kasih juga kami sampaikan kepada AMIK-BSI selaku
lembaga yang telah memberikan kami pasilitas sehingga
semester 4 kami selesaikan dengan penuh gembira .
Akhir kata kami ucapkan sampai jumpa di semester
berikutnya…moga kita semua dalam selalu dalam lindungan
Yang Maha Esa.
Create : Agus Muhardi

More Related Content

Similar to 31706341 latihan-vb-step-by-step

Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaYusman Kurniadi
 
Cassandra Community Webinar - Introduction To Apache Cassandra 1.2
Cassandra Community Webinar  - Introduction To Apache Cassandra 1.2Cassandra Community Webinar  - Introduction To Apache Cassandra 1.2
Cassandra Community Webinar - Introduction To Apache Cassandra 1.2aaronmorton
 
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2Cassandra Community Webinar | Introduction to Apache Cassandra 1.2
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2DataStax
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data ComedyMike Harris
 
SequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational DatabaseSequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational Databasewangzhonnew
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Aleksandr Kuzminsky
 
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWSAWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWSCobus Bernard
 
Revision booklet 6957 2016
Revision booklet 6957 2016Revision booklet 6957 2016
Revision booklet 6957 2016jom1987
 
SQL Database Design & Querying
SQL Database Design & QueryingSQL Database Design & Querying
SQL Database Design & QueryingCobain Schofield
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02wingsrai
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01tabish
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewAshish Kumar
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02tabish
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บทMareenaHahngeh
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บทMareenaHahngeh
 
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentation
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentationsupporting t-sql scripts for IndexPage, Datapage and IndexDefragmentation
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentationMahabubur Rahaman
 
New Features in Apache Pinot
New Features in Apache PinotNew Features in Apache Pinot
New Features in Apache PinotSiddharth Teotia
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 

Similar to 31706341 latihan-vb-step-by-step (20)

Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
 
Cassandra Community Webinar - Introduction To Apache Cassandra 1.2
Cassandra Community Webinar  - Introduction To Apache Cassandra 1.2Cassandra Community Webinar  - Introduction To Apache Cassandra 1.2
Cassandra Community Webinar - Introduction To Apache Cassandra 1.2
 
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2Cassandra Community Webinar | Introduction to Apache Cassandra 1.2
Cassandra Community Webinar | Introduction to Apache Cassandra 1.2
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data Comedy
 
SequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational DatabaseSequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational Database
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)
 
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWSAWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
 
Revision booklet 6957 2016
Revision booklet 6957 2016Revision booklet 6957 2016
Revision booklet 6957 2016
 
SQL Database Design & Querying
SQL Database Design & QueryingSQL Database Design & Querying
SQL Database Design & Querying
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บท
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บท
 
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentation
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentationsupporting t-sql scripts for IndexPage, Datapage and IndexDefragmentation
supporting t-sql scripts for IndexPage, Datapage and IndexDefragmentation
 
New Features in Apache Pinot
New Features in Apache PinotNew Features in Apache Pinot
New Features in Apache Pinot
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 

More from Andi Simanjuntak

2008.1 cara instal vb 2008
2008.1 cara instal vb 20082008.1 cara instal vb 2008
2008.1 cara instal vb 2008Andi Simanjuntak
 
2005.5 vb net koneksi database sql server
2005.5 vb net koneksi database sql server2005.5 vb net koneksi database sql server
2005.5 vb net koneksi database sql serverAndi Simanjuntak
 
Visualbasic13.a belajar membuat database
Visualbasic13.a belajar membuat databaseVisualbasic13.a belajar membuat database
Visualbasic13.a belajar membuat databaseAndi Simanjuntak
 
Modul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap okModul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap okAndi Simanjuntak
 

More from Andi Simanjuntak (6)

2008.1 cara instal vb 2008
2008.1 cara instal vb 20082008.1 cara instal vb 2008
2008.1 cara instal vb 2008
 
2008.2 pengenalan vb 2008
2008.2 pengenalan vb 20082008.2 pengenalan vb 2008
2008.2 pengenalan vb 2008
 
2005.5 vb net koneksi database sql server
2005.5 vb net koneksi database sql server2005.5 vb net koneksi database sql server
2005.5 vb net koneksi database sql server
 
Visualbasic13.a belajar membuat database
Visualbasic13.a belajar membuat databaseVisualbasic13.a belajar membuat database
Visualbasic13.a belajar membuat database
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
 
Modul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap okModul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap ok
 

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

31706341 latihan-vb-step-by-step

  • 1. Di Susun Oleh Agus Muhardi, A.Md Jurusan Komputerisasi Akuntansi dan Manajeman Informatika BINA SARANA INFORMATIKA DAN KOMPUTER Tangerang 2005
  • 2. 2 Kunci Jawaban Soal Latihan Pra UAS Tipe A Objek-objek yang terkait: Objeck Properties Nilai Form1 Caption Alga Musa Data1 Name Caption Database Name Recordset Type Record Source Toko Data Toko Cari Difolder Masing2 0-Table Tbl_Toko Label1 Caption Toko Alat Tulis Alga Musa Label2 Caption Nama Barang Label3 Caption Harga Barang Label4 Caption Jumlah Barang Label5 Caption Bayar Label6 Caption Potongan Label7 Caption Total Bayar Text1 Name DataSource DataField Text Txtnama Toko Sesuaikan dengan fieldnya masing2 <Kosongkan> Text2 Name DataSource DataField Text Txtharga Toko Sesuaikan dengan fieldnya masing2 <Kosongkan> Text3 Name DataSource DataField Text Txtjumlah Toko Sesuaikan dengan fieldnya masing2 <Kosongkan> Text4 Name DataSource DataField Text Txtbayar Toko Sesuaikan dengan fieldnya masing2 <Kosongkan> Text5 Name DataSource DataField Text Txtpot Toko Sesuaikan dengan fieldnya masing2 <Kosongkan> Text6 Name DataSource DataField Text Txttotal Toko Sesuaikan dengan fieldnya masing2 <Kosongkan>
  • 3. 3 Frame1 Caption Tombol Operasi CommandButton1 Name Caption Cmdadd &ADD CommandButton2 Name Caption Cmdcancel &CANCEL CommandButton3 Name Caption Cmdsave &SAVE CommandButton4 Name Caption Cmdhitung &HITUNG CommandButton5 Name Caption Cmdexit E&XIT Dbgrid1 Caption DataSource DATA TRANSAKSI Toko Listing Programnya: Private Sub cmdadd_Click() tambah = True toko.Recordset.AddNew txtnama.SetFocus End Sub Private Sub cmdcancel_Click() toko.Recordset.CancelUpdate toko.Recordset.MoveLast End Sub Private Sub cmdexit_Click() psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi") If psn = vbYes Then MsgBox "Makasih Yach.........", 32, "informasi" End Else If psn = vbNo Then MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi" End If End If End Sub Private Sub cmdlagi_Click() dbbio.Recordset.MoveNext If dbbio.Recordset.EOF Then dbbio.Recordset.MoveLast MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi" End If End Sub Private Sub cmdhitung_Click() txtbayar.Text = Val(txtharga.Text) * Val(txtjumlah.Text) If txtjumlah > 5 Then txtpot.Text = 2 / 100 * Val(txtbayar.Text) txttotal.Text = Val(txtbayar.Text) - Val(txtpot.Text) Else txtpot.Text = 0 txttotal = Val(txtbayar.Text) - Val(txtpot.Text) End If End Sub Private Sub cmdsave_Click() If tambah = True Then toko.Recordset.Update Else toko.Recordset.Update End If End Sub Private Sub Form_Load() tambah = False End Sub Private Sub txtharga_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtjumlah.SetFocus End If End Sub Private Sub txtjumlah_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmdhitung.SetFocus End If End Sub Private Sub txtnama_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then txtharga.SetFocus End If End Sub
  • 4. 4 Kunci Jawaban Soal Latihan Pra UAS Tipe B Objek-objek yang terkait : Objeck Properties Nilai Form1 Caption Alga Musa Data1 Name Caption Database Name Recordset Type Record Source Data1 Data Musik Cari Difolder Masing2 0-Table Tbl_Musik Data2 Name Caption Database Name Recordset Type Record Source Data2 Data Film Cari Difolder Masing2 1-Dynaset Tbl_Film Label1 Caption Toko VCD Alga Musa Frame1 Caption Musik Label2 Caption Jenis Musik Label3 Caption Harga Label4 Caption Jumlah Beli Text1 Name DataSource DataField Text Text1 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text2 Name DataSource DataField Text Text2 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text3 Name DataSource DataField Text Text3 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan> Frame2 Caption Film Label5 Caption Jenis Film Label6 Caption Harga Label7 Caption Jumlah Beli Text4 Name DataSource DataField Text Text4 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan>
  • 5. 5 Text5 Name DataSource DataField Text Text5 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text6 Name DataSource DataField Text Text6 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan> CommandButton1 Name Caption Cmdback BACK CommandButton2 Name Caption Cmdnext NEXT CommandButton3 Name Caption Cmdcarimusik CARI JENIS MUSIK CommandButton4 Name Caption Cmdback1 BACK CommandButton5 Name Caption Cmdnext1 NEXT CommandButton6 Name Caption Cmdcarifilm CARI JENIS FILM Frame3 Caption Transaksi Pembayaran Label8 Caption Total Bayar Label9 Caption Uang Bayar Label10 Caption Uang Kembali Text7 Name Text Text7 <Kosongkan> Text8 Name Text Text8 <Kosongkan> Text9 Name Text Text9 <Kosongkan> CommandButton8 Name Caption Cmdhitung HITUNG CommandButton9 Name Caption Cmdkeluar KELUAR Listing Programnya: Dim bayar As Long Private Sub cmdback_Click() Data1.Recordset.MovePrevious If Data1.Recordset.BOF Then Data1.Recordset.MoveFirst MsgBox "Sudah Diawal Record Adek", "16", "Informasi" End If End Sub Private Sub cmdcarifilm_Click() Dim soraya As String * 5 Dim lusiana As String soraya = InputBox("Ketik Kode Musik:", "Pencarian Biodata") lusiana = "kd_film ='" & soraya & "'" Data2.Recordset.FindFirst lusiana If Data2.Recordset.NoMatch Then MsgBox "Maaf Mas Kode Musik " + soraya + " tidk ada", 16, "informasi" Data2.Recordset.MoveFirst End If End Sub Private Sub cmdcarimusuk_Click() Dim soraya As String * 5 soraya = InputBox("Ketik Kode Musik:", "Pencarian Biodata") alga_musa = "kd_musik '" & soraya & "'" Data1.Recordset.Index = "kdmusik" Data1.Recordset.Seek "=", soraya If Data1.Recordset.NoMatch Then MsgBox "Maaf Mas Kode Musik " + soraya + " tidk ada", 16, "informasi" Data1.Recordset.MoveFirst End If End Sub
  • 6. 6 Private Sub cmdhitung_Click() bayar = Val(Text2.Text) * Val(Text3.Text) + Val(Text5.Text) * Val(Text6.Text) Text7 = Format(bayar, " Rp ###,###,###") & ",-" End Sub Private Sub cmdkeluar_Click() psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi") If psn = vbYes Then MsgBox "Makasih Yach.........", 32, "informasi" End Else If psn = vbNo Then MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi" End If End If End Sub Private Sub cmdnext_Click() Data1.Recordset.MoveNext If Data1.Recordset.EOF Then Data1.Recordset.MoveLast MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi" End If End Sub Private Sub cmdnext1_Click() Data2.Recordset.MoveNext If Data2.Recordset.EOF Then Data2.Recordset.MoveLast MsgBox "Sudah Diakhir Reocrd Adek...Sayang", 16, "Informasi" End If End Sub Private Sub cmdback1_Click() Data2.Recordset.MovePrevious If Data2.Recordset.BOF Then Data2.Recordset.MoveFirst MsgBox "Sudah Diawal Record Adek", "16", "Informasi" End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text6.SetFocus End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmdhitung.SetFocus End If End Sub Private Sub Text8_Change() On Error Resume Next Text9.Text = Format(Text8.Text - bayar, " Rp ###,###,###") & ",-" End Sub
  • 7. 7 Kunci Jawaban Soal Latihan Pra UAS Tipe C Objek-objek yang terkait : Objeck Properties Nilai Form1 Caption Alga Musa Label1 Caption Café Alga Musa Data1 Name Caption Database Name Recordset Type Record Source Data1 Data Makan Cari Difolder Masing2 0-Table Tbl_Makan Data2 Name Caption Database Name Recordset Type Record Source Data2 Data Minum Cari Difolder Masing2 0-Table Tbl_Minum Dbgrid1 Caption DataSource Menu Pempek Data1 Dbgrid2 Caption DataSource Menu Minuman Data2 Frame1 Caption Pesanan Pempek Label2 Caption Nama Makanan Label3 Caption Harga Label4 Caption Jumlah Porsi Text1 Name DataSource DataField Text Text1 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text2 Name DataSource DataField Text Text2 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text3 Name DataSource DataField Text Text3 Data1 Sesuaikan dengan fieldnya masing2 <Kosongkan>
  • 8. 8 Frame2 Caption Pesanan Minuman Label5 Caption Nama Minuman Label6 Caption Harga Label7 Caption Jumlah Porsi Text4 Name DataSource DataField Text Text4 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text5 Name DataSource DataField Text Text5 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan> Text6 Name DataSource DataField Text Text6 Data2 Sesuaikan dengan fieldnya masing2 <Kosongkan> Frame3 Caption Data Transaksi Label8 Caption Total Bayar Label9 Caption Uang Bayar Label10 Caption Kembali Text7 Name Text Text7 <Kosongkan> Text8 Name Text Text8 <Kosongkan> Text9 Name Text Text9 <Kosongkan> CommandButton8 Name Caption Cmdhitung HITUNG CommandButton9 Name Caption Cmdkeluar KELUAR Listing Programnya: Private Sub cmdhitung_Click() bayar = Val(Text2.Text) * Val(Text3.Text) + Val(Text5.Text) * Val(Text6.Text) Text7.Text = Format(bayar, " Rp ###,###,###") & ",-" End Sub Private Sub cmdkeluar_Click() psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi") If psn = vbYes Then MsgBox "Makasih Yach.........", 32, "informasi" End Else If psn = vbNo Then MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi" End If End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text6.SetFocus End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmdhitung.SetFocus End If End Sub Private Sub Text8_Change() On Error Resume Next Text9.Text = Format(Text8.Text - bayar, " Rp ###,###,###") & ",-" End Sub
  • 9. 9 Kunci Jawaban Soal Latihan Pra UAS Tipe D Objek-objek yang terkait : Objeck Properties Nilai Form1 Caption Alga Musa Motor Label1 Caption Alga Musa Motor Data1 Name Caption Database Name Recordset Type Record Source Motor Data Motor Cari Difolder Masing2 0-Table Tbl_Motor Frame1 Caption Honda Option1 Caption SPR Option2 Caption KRM Option3 Caption LGD Option4 Caption WIN Frame2 Caption Suzuki Option5 Caption SMH Option6 Caption SGN Option7 Caption STR Frame3 Caption Yamaha Option8 Caption FGR Option9 Caption JPR Option10 Caption RXK Frame4 Caption Data Transaksi Label2 Caption Jenis Motor Label3 Caption Harga Motor Label4 Caption Jumlah Beli Label5 Caption Bayar Label6 Caption Potongan Label7 Caption Total Bayar
  • 10. 10 Text1 Name DataSource DataField Text txtjenis Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> Text2 Name DataSource DataField Text txtharga Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> Text3 Name DataSource DataField Text txtjumlah Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> Text4 Name DataSource DataField Text txtbayar Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> Text5 Name DataSource DataField Text txtpotong Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> Text6 Name DataSource DataField Text txttotal Motor Sesuaikan dengan fieldnya masing2 <Kosongkan> CommandButton1 Name Caption Cmdtambah TAMBAH CommandButton2 Name Caption Cmdsimpan SIMPAN CommandButton3 Name Caption Cmdbatal BATAL CommandButton4 Name Caption Cmdhitung HITUNG CommandButton5 Name Caption Cmdkeluar KELUAR Dbgrid1 Caption DataSource DATA TRANSAKSI Motor Listing Programnya: Private Sub cmdbatal_Click() motor.Recordset.CancelUpdate motor.Recordset.MoveLast End Sub Private Sub cmdhitung_Click() txtbayar.Text = Val(txtharga.Text) * Val(txtjumlah.Text) If txtjumlah > 5 Then txtpotong.Text = 2 / 100 * Val(txtbayar.Text) txttotal.Text = Val(txtbayar.Text) - Val(txtpotong.Text) Else txtpotong.Text = 0 txttotal = Val(txtbayar.Text) - Val(txtpotong.Text) End If End Sub Private Sub cmdkeluar_Click() psn = MsgBox("Anda Yakin Ingin Keluar", 32 + 4, "Informasi") If psn = vbYes Then MsgBox "Makasih Yach.........", 32, "informasi" End Else If psn = vbNo Then MsgBox "Lho.....kok enggak jadi toh", 32, "Informasi" End If End If End Sub
  • 11. 11 Private Sub cmdsimpan_Click() If tambah = True Then motor.Recordset.Update Else motor.Recordset.Update End If End Sub Private Sub cmdtambah_Click() tambah = True motor.Recordset.AddNew txtjenis.SetFocus End Sub Private Sub Form_Load() tambah = False Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option1_Click() txtjenis.Text = "Supra" txtharga.Text = 8000000 txtjumlah.SetFocus Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option10_Click() txtjenis.Text = "Jupiter" txtharga.Text = 10000000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option11.Value = False End Sub Private Sub Option11_Click() txtjenis.Text = "RX King" txtharga.Text = 15000000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False End Sub Private Sub Option2_Click() txtjenis.Text = "Karisma" txtharga.Text = 8500000 txtjumlah.SetFocus Option1.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option3_Click() txtjenis.Text = "Lagenda" txtharga.Text = 8560000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option4_Click() txtjenis.Text = "Honda Win" txtharga.Text = 7500000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option5_Click() txtjenis.Text = "Smesh" txtharga.Text = 6500000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option6.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option6_Click() txtjenis.Text = "Sohgon" txtharga.Text = 7800000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option7.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub
  • 12. 12 Private Sub Option7_Click() txtjenis.Text = "Satria" txtharga.Text = 13000000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option9.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub Option9_Click() txtjenis.Text = "Vega R" txtharga.Text = 12000000 txtjumlah.SetFocus Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option10.Value = False Option11.Value = False End Sub Private Sub txtjumlah_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmdhitung.SetFocus End If End Sub Prakata Puji Syukur kami ucapkan kepada Allah S.W.T yang telah memberikan nikmat kesehatan sehingga kami mampu menyelesaikan materi Microsoft Visula Basic ini dan ucapan terima kasih juga kami sampaikan kepada AMIK-BSI selaku lembaga yang telah memberikan kami pasilitas sehingga semester 4 kami selesaikan dengan penuh gembira . Akhir kata kami ucapkan sampai jumpa di semester berikutnya…moga kita semua dalam selalu dalam lindungan Yang Maha Esa. Create : Agus Muhardi