This document provides code for creating a VB 6.0 program to manage population data using a Microsoft Access database. It includes code for forms to input, view, edit and delete records for resident identity cards (KTP), family cards (KK), and transactions. The code defines form controls, connects to the Access tables, adds/updates/deletes records, and includes validation and user interface functions.
Using JSON/BSON types in your hybrid application environmentAjay Gupte
This presentation will cover overview of
JSON/BSON types along with various SQL
features. It will cover JSON/BSON data extraction, performance & tips for hybrid environment.
Examples will have SQL features such as Views,
Derived Tables, Stored Procedure, Hierarchical
queries
Dev Jumpstart: Build Your First App with MongoDBMongoDB
New to MongoDB? This talk will introduce the philosophy and features of MongoDB. We’ll discuss the benefits of the document-based data model that MongoDB offers by walking through how one can build a simple app to store books. We’ll cover inserting, updating, and querying the database of books. This session will jumpstart your knowledge of MongoDB development, providing you with context for the rest of the day's content.
Ameritrust Residential Services is a full service construction company headquartered in Marietta, Georgia providing rehab, maintenance and turn services to single family home investors. We work with individuals and institutions, flippers and SFR portfolio builders. We also service property managers who utilize us specifically for their maintenance and turn work orders. We are a licensed General Contractor providing our services throughout the Southeast with offices in Marietta, Atlanta, Tampa Bay, Orlando, Jacksonville, Nashville, and Charlotte.
#Elite_Certification provides #ISO 18001 #Certification In India. This #standard helps in #controlling, measuring and #monitoring risks that can arise from the #organization’s daily base #activities. See more @ http://bit.ly/16dmTaK
A proposed house plan has 4 rooms including 2 bedrooms, a living room, and a combined small store/kitchen. The house would be for a low-income earner making between 1.8-2.4 million annually and cost about 15 million. The toilet and bathroom are located outside while a verandah is included to enhance the appearance of the low-cost home.
Dokumen tersebut membahas metode analisis unsur dan kriteria kemurnian senyawa organik. Metode analisis unsur meliputi pembakaran sampel untuk menghasilkan karbon dioksida dan air yang kemudian dijebak, sedangkan kriteria kemurnian senyawa organik pada abad ke-20 meliputi analisis unsur dan pengukuran titik leleh serta titik didih. Fisikawan Jerman Kohlrausch berupaya mendapatkan data fisik yang akurat dengan menggun
Using JSON/BSON types in your hybrid application environmentAjay Gupte
This presentation will cover overview of
JSON/BSON types along with various SQL
features. It will cover JSON/BSON data extraction, performance & tips for hybrid environment.
Examples will have SQL features such as Views,
Derived Tables, Stored Procedure, Hierarchical
queries
Dev Jumpstart: Build Your First App with MongoDBMongoDB
New to MongoDB? This talk will introduce the philosophy and features of MongoDB. We’ll discuss the benefits of the document-based data model that MongoDB offers by walking through how one can build a simple app to store books. We’ll cover inserting, updating, and querying the database of books. This session will jumpstart your knowledge of MongoDB development, providing you with context for the rest of the day's content.
Ameritrust Residential Services is a full service construction company headquartered in Marietta, Georgia providing rehab, maintenance and turn services to single family home investors. We work with individuals and institutions, flippers and SFR portfolio builders. We also service property managers who utilize us specifically for their maintenance and turn work orders. We are a licensed General Contractor providing our services throughout the Southeast with offices in Marietta, Atlanta, Tampa Bay, Orlando, Jacksonville, Nashville, and Charlotte.
#Elite_Certification provides #ISO 18001 #Certification In India. This #standard helps in #controlling, measuring and #monitoring risks that can arise from the #organization’s daily base #activities. See more @ http://bit.ly/16dmTaK
A proposed house plan has 4 rooms including 2 bedrooms, a living room, and a combined small store/kitchen. The house would be for a low-income earner making between 1.8-2.4 million annually and cost about 15 million. The toilet and bathroom are located outside while a verandah is included to enhance the appearance of the low-cost home.
Dokumen tersebut membahas metode analisis unsur dan kriteria kemurnian senyawa organik. Metode analisis unsur meliputi pembakaran sampel untuk menghasilkan karbon dioksida dan air yang kemudian dijebak, sedangkan kriteria kemurnian senyawa organik pada abad ke-20 meliputi analisis unsur dan pengukuran titik leleh serta titik didih. Fisikawan Jerman Kohlrausch berupaya mendapatkan data fisik yang akurat dengan menggun
The document discusses strategies for effective digital campaigning and engagement. It notes that most supporters are passive, while a small percentage are super active. It emphasizes the importance of using data to understand supporters and test different approaches. A/B testing of email content can significantly increase open and click-through rates. The key is to focus on why people should get involved rather than just what an institution or campaign is doing. Engagement is best increased through ongoing two-way conversations rather than one-way newsletters. Clear calls to action and measurable goals along the way are also important aspects of effective digital campaigning.
Terrorism continues to evolve with new threats emerging. Nations must adapt defenses against unpredictable terrorist tactics to protect citizens. Cooperation across borders is essential to share intelligence and prevent future terrorist attacks.
Pakistan's education sector faced numerous challenges prior to 2003 as evidenced by various education statistics:
- Literacy rates were low, with the total population literacy rate at 45.7%, ranking 185th out of 202 countries. Female literacy was even lower at 30.6%.
- Government spending on education was only 2.3% of GDP, ranking 102nd out of 130 countries.
- Female enrollment in primary education was just 35.9% and only 39.5% in secondary education, with over half of primary school-aged girls not attending school.
- While progression to secondary level education was relatively high at 94.6%, pupils per teacher ratios and quality of education were still areas that needed improvement.
The document discusses the design and purpose of a digipak and magazine advertisement for a band's new album. The digipak uses a pink and blue color scheme inspired by other albums in the same genre. It features photos related to the band's music video, including images of a pylon, to create branding and links between the products. The ad in the magazine also uses the front cover photo for consistency. Together, the digipak, ad, and music video employ genre-related codes and imagery of a pylon to promote the band and form connections that will increase audience recognition and satisfaction.
Mexico is a growing market for international businesses and offers many opportunities. However, there are cultural and legal differences compared to other countries that businesses should be aware of before expanding into Mexico. Taking the time to understand these differences can help businesses avoid issues and have a smoother entry into the Mexican market.
Este documento presenta citas de varios autores sobre temas como el descubrimiento personal a través de los obstáculos, la necesidad de pensar de manera diferente para resolver problemas, la vida que ocurre mientras hacemos planes y la importancia de basar teorías en los hechos en lugar de alterar los hechos para que encajen con las teorías. También incluye una cita sobre la preferencia de no necesitar amigos que simplemente asientan sin pensar.
Cuestiones de preparación del control global de Geografía Económica 2º trimestreletiziatorres
Este documento presenta una serie de preguntas sobre temas relacionados con la globalización, los países desarrollados y la Triada (Japón, EE.UU. y la Unión Europea). Las preguntas abarcan conceptos como las características y consecuencias de la globalización, las organizaciones internacionales como el FMI y el Banco Mundial, y las características económicas, demográficas y geográficas de los principales países y regiones desarrolladas.
Haiku Deck is a presentation tool that allows users to create Haiku-style slideshows. The tool encourages users to get started making their own Haiku Deck presentations, which can be shared on SlideShare. In just 3 sentences, it promotes creating Haiku Deck presentations and publishing them to SlideShare.
512 km composite melbourne radar loop 10.3.11 re rings melb 12.35edtKaren Fawcett
This 512 km composite radar loop from the Bureau of Meteorology shows radar imagery of Melbourne and surrounding areas over a 24 hour period. The loop allows users to view rainfall patterns and movements over time through animated radar frames. Additional map features and weather observations for specific locations can be viewed by selecting options on the page.
This document contains code for an inventory management system. It includes modules for connecting to a database, handling user login and permissions, and inputting/managing product data. The login module verifies user credentials and sets permission levels. The product input module provides functions for inserting, updating, deleting and searching for product records in the database. It initializes forms and controls for data entry and management.
This document contains code for an inventory management system. It includes modules for connecting to a database, handling user login and permissions, and inputting/managing product data. The login module verifies user credentials and sets permission levels. The product input module provides functions for inserting, updating, deleting and searching for product records in the database. It establishes the database connection and uses SQL commands to manage the data.
This document provides instructions for creating a Visual Basic application for a film rental system. It includes requirements for installing Visual Basic 6.0, Crystal Reports 8.5, and additional components. It also provides directions for creating a database, adding controls, and configuring properties. The document then shares code listings for creating form modules, including procedures for handling inputs, validating data, displaying records, and interacting with the database.
Adodb Scripts And Some Sample Scripts[1]testduser1
The document contains code snippets demonstrating various ways to interact with databases and files in Visual Basic Script (VBS). This includes examples of connecting to databases, inserting and retrieving data, importing/exporting data from Excel files, reading/writing to text files, and running SQL commands. The last example shows how to parameterize login tests by reading username and password data from an Excel file.
The document contains code snippets demonstrating various ways to interact with databases and files in Visual Basic Script (VBS). This includes examples of connecting to databases, inserting and retrieving data, importing/exporting data from Excel files, reading/writing to text files, and running SQL commands. The last example shows how to parameterize login tests by reading username and password data from an Excel file.
This document contains source code for password login authentication, a menu form, and a point of sales (POS) form. The password code authenticates the user login and hides/shows forms. The menu form changes the window caption and contains click events to show other forms. The POS form contains recordsets to manage data in various tables, includes buttons to add/edit/delete records, and refreshes lists on form load.
This document contains code for a school fee payment application. It includes code for:
1. Connecting to a database and retrieving student and payment records.
2. Activating and deactivating form controls for inputting, viewing and modifying payment details.
3. Generating sequential payment codes, validating input, and saving new payment and detail records to the database.
The document contains code for a password protected form that allows the user to log in with their username and password. It also contains code for a main form that collects customer information like name, address, phone number and validates the required fields. The main form allows the user to navigate to additional forms to select snowboards, bindings, boots and other items.
The document discusses strategies for effective digital campaigning and engagement. It notes that most supporters are passive, while a small percentage are super active. It emphasizes the importance of using data to understand supporters and test different approaches. A/B testing of email content can significantly increase open and click-through rates. The key is to focus on why people should get involved rather than just what an institution or campaign is doing. Engagement is best increased through ongoing two-way conversations rather than one-way newsletters. Clear calls to action and measurable goals along the way are also important aspects of effective digital campaigning.
Terrorism continues to evolve with new threats emerging. Nations must adapt defenses against unpredictable terrorist tactics to protect citizens. Cooperation across borders is essential to share intelligence and prevent future terrorist attacks.
Pakistan's education sector faced numerous challenges prior to 2003 as evidenced by various education statistics:
- Literacy rates were low, with the total population literacy rate at 45.7%, ranking 185th out of 202 countries. Female literacy was even lower at 30.6%.
- Government spending on education was only 2.3% of GDP, ranking 102nd out of 130 countries.
- Female enrollment in primary education was just 35.9% and only 39.5% in secondary education, with over half of primary school-aged girls not attending school.
- While progression to secondary level education was relatively high at 94.6%, pupils per teacher ratios and quality of education were still areas that needed improvement.
The document discusses the design and purpose of a digipak and magazine advertisement for a band's new album. The digipak uses a pink and blue color scheme inspired by other albums in the same genre. It features photos related to the band's music video, including images of a pylon, to create branding and links between the products. The ad in the magazine also uses the front cover photo for consistency. Together, the digipak, ad, and music video employ genre-related codes and imagery of a pylon to promote the band and form connections that will increase audience recognition and satisfaction.
Mexico is a growing market for international businesses and offers many opportunities. However, there are cultural and legal differences compared to other countries that businesses should be aware of before expanding into Mexico. Taking the time to understand these differences can help businesses avoid issues and have a smoother entry into the Mexican market.
Este documento presenta citas de varios autores sobre temas como el descubrimiento personal a través de los obstáculos, la necesidad de pensar de manera diferente para resolver problemas, la vida que ocurre mientras hacemos planes y la importancia de basar teorías en los hechos en lugar de alterar los hechos para que encajen con las teorías. También incluye una cita sobre la preferencia de no necesitar amigos que simplemente asientan sin pensar.
Cuestiones de preparación del control global de Geografía Económica 2º trimestreletiziatorres
Este documento presenta una serie de preguntas sobre temas relacionados con la globalización, los países desarrollados y la Triada (Japón, EE.UU. y la Unión Europea). Las preguntas abarcan conceptos como las características y consecuencias de la globalización, las organizaciones internacionales como el FMI y el Banco Mundial, y las características económicas, demográficas y geográficas de los principales países y regiones desarrolladas.
Haiku Deck is a presentation tool that allows users to create Haiku-style slideshows. The tool encourages users to get started making their own Haiku Deck presentations, which can be shared on SlideShare. In just 3 sentences, it promotes creating Haiku Deck presentations and publishing them to SlideShare.
512 km composite melbourne radar loop 10.3.11 re rings melb 12.35edtKaren Fawcett
This 512 km composite radar loop from the Bureau of Meteorology shows radar imagery of Melbourne and surrounding areas over a 24 hour period. The loop allows users to view rainfall patterns and movements over time through animated radar frames. Additional map features and weather observations for specific locations can be viewed by selecting options on the page.
This document contains code for an inventory management system. It includes modules for connecting to a database, handling user login and permissions, and inputting/managing product data. The login module verifies user credentials and sets permission levels. The product input module provides functions for inserting, updating, deleting and searching for product records in the database. It initializes forms and controls for data entry and management.
This document contains code for an inventory management system. It includes modules for connecting to a database, handling user login and permissions, and inputting/managing product data. The login module verifies user credentials and sets permission levels. The product input module provides functions for inserting, updating, deleting and searching for product records in the database. It establishes the database connection and uses SQL commands to manage the data.
This document provides instructions for creating a Visual Basic application for a film rental system. It includes requirements for installing Visual Basic 6.0, Crystal Reports 8.5, and additional components. It also provides directions for creating a database, adding controls, and configuring properties. The document then shares code listings for creating form modules, including procedures for handling inputs, validating data, displaying records, and interacting with the database.
Adodb Scripts And Some Sample Scripts[1]testduser1
The document contains code snippets demonstrating various ways to interact with databases and files in Visual Basic Script (VBS). This includes examples of connecting to databases, inserting and retrieving data, importing/exporting data from Excel files, reading/writing to text files, and running SQL commands. The last example shows how to parameterize login tests by reading username and password data from an Excel file.
The document contains code snippets demonstrating various ways to interact with databases and files in Visual Basic Script (VBS). This includes examples of connecting to databases, inserting and retrieving data, importing/exporting data from Excel files, reading/writing to text files, and running SQL commands. The last example shows how to parameterize login tests by reading username and password data from an Excel file.
This document contains source code for password login authentication, a menu form, and a point of sales (POS) form. The password code authenticates the user login and hides/shows forms. The menu form changes the window caption and contains click events to show other forms. The POS form contains recordsets to manage data in various tables, includes buttons to add/edit/delete records, and refreshes lists on form load.
This document contains code for a school fee payment application. It includes code for:
1. Connecting to a database and retrieving student and payment records.
2. Activating and deactivating form controls for inputting, viewing and modifying payment details.
3. Generating sequential payment codes, validating input, and saving new payment and detail records to the database.
The document contains code for a password protected form that allows the user to log in with their username and password. It also contains code for a main form that collects customer information like name, address, phone number and validates the required fields. The main form allows the user to navigate to additional forms to select snowboards, bindings, boots and other items.
This document provides instructions for creating a simple book sales application in VB.Net. It describes setting up the database tables, designing the user interface forms, and includes example code for form functionality like loading and saving data. Tables are created for book types, books, transactions, and transaction details. Forms are designed for a main menu, managing book types and books, and processing sales transactions. Code examples show connecting to the database and querying/manipulating data. The goal is to demonstrate creating a basic working application with a database backend using VB.Net.
This document contains code for a vehicle rental application. It includes code to connect to a database, retrieve and display rental records in a grid, add new rentals, and calculate rental prices based on vehicle type and duration. Functions are included to clear fields, disable/enable controls, and validate input when selecting vehicles or customers.
This document contains code for an application that allows users to add/update patient records in a database. It includes functions for connecting to the database, retrieving and populating dropdown lists of doctors and departments from tables, inserting/updating patient records, and navigating between forms to admit patients or view checkups.
This code handles form submission and file uploads. It retrieves form variables and file details from the request, sets default values for insert parameters, saves uploaded files to a specified location, and inserts the data into a database table. Any missing form keys are logged.
This document contains a Visual Basic program to calculate an employee's net salary based on their employment status. It defines input objects like text boxes for employee name, allowances, deductions, etc. It then writes the program code to read the input data, select the appropriate salary calculation logic based on the employee status, and output the results. The program status options are populated in a combo box. Clicking the "Process" button runs the calculations and displays the output, while "Stop" exits the program.
ReasonML is a syntax and toolchain that brings OCaml to the web by compiling to JavaScript. It uses BuckleScript to compile Reason code to readable, optimized JS. Reason code looks similar to OCaml but with a modernized syntax that is friendlier for web development. It provides type safety through static typing and type inference while allowing for easy interoperability with JavaScript. The tooling includes package management, bundling, formatting, linting and more. ReasonReact provides a React-like experience for building user interfaces with ReasonML.
This document provides an overview of how to write plugins for the Apache Traffic Server (ATS) web server. It discusses the plugin architecture, including initialization, hook registration, and handling events through continuations. It also covers key APIs for interacting with transactions, sessions, URLs, HTTP headers, and more. The goal is to provide newcomers with enough information to get started writing their first ATS plugin.
This document provides information about JSON (JavaScript Object Notation) including:
1. What JSON is and how it is used to structure and exchange data between web applications.
2. The syntax rules of JSON including how data is separated into name/value pairs within curly braces and square brackets.
3. Examples of JSON syntax including objects, arrays, and accessing JSON data using dot notation.
4. How JSON differs from JavaScript objects and how to convert between the two formats using JSON.parse() and JSON.stringify() methods.
1. Siang gan,, untuk mengisi waktu luang bulan puasa ini,, marilah kita berkarya sambil belajar,,
Ok,, Disini saya mencoba membuat program data penduduk denagn menggunakan VB 6.0.
database nya kita gunakan Acces,, Ok gan,,,
Pertama-tama kita rancang desain file nya terlebih dahulu, dengan
Nama Table : Penduduk.mdb.
Selengkap nya lihat Gambar di bawah ini..
dengan table KTP nya seperti ini..
Jadikan NIK sebagai Key Nya..
lanjut kan dengan table KK dan Transaksi nya sendiri ya.. hehe..
Kemudian Buka Vb 6.0,, Lalu kita rancang Form
KTP nya seperti gambar dibawah ini..
2. Coding nya..
Dim tambah As Boolean
Sub Aktif()
TxtNIK.Enabled = True
TxtNama.Enabled = True
CboJekel.Enabled = True
TxtTempat.Enabled = True
TxtTgl.Enabled = True
TxtAlamat.Enabled = True
TxtAgama.Enabled = True
TxtPekerjaan.Enabled = True
CboStatus.Enabled = True
End Sub
Sub Nonaktif()
TxtNIK.Enabled = False
TxtNama.Enabled = False
CboJekel.Enabled = False
TxtTempat.Enabled = False
TxtTgl.Enabled = False
TxtAlamat.Enabled = False
TxtAgama.Enabled = False
TxtPekerjaan.Enabled = False
CboStatus.Enabled = False
End Sub
Sub Bersih()
TxtNIK = ""
TxtNama = ""
CboJekel = ""
TxtTempat = ""
TxtAlamat = ""
TxtAgama = ""
TxtPekerjaan = ""
CboStatus = ""
End Sub
Sub Tampil()
TxtNIK.Text = dbKTP.Recordset!NIK
TxtNama.Text = dbKTP.Recordset!Nama
CboJekel.Text = dbKTP.Recordset!Jekel
TxtTempat.Text = dbKTP.Recordset!Tmp_Lahir
TxtTgl.Value = dbKTP.Recordset!Tgl_Lahir
TxtAlamat.Text = dbKTP.Recordset!Alamat
TxtAgama.Text = dbKTP.Recordset!Agama
TxtPekerjaan.Text = dbKTP.Recordset!Pekerjaan
CboStatus.Text = dbKTP.Recordset!Status
End Sub
Private Sub CboTambah_Click()
End Sub
Private Sub CmdBatal_Click()
Bersih
Nonaktif
End Sub
Private Sub Form_Activate()
Call Nonaktif
CmdSimpan.Enabled = False
3. End Sub
Private Sub CmdTambah_Click()
tambah = True
Call Aktif
CmdSimpan.Enabled = True
Call Bersih
TxtNIK.SetFocus
End Sub
Private Sub CmdSimpan_Click()
If TxtNIK = "" Or TxtNama = "" Or CboJekel = "" Or TxtTempat = "" Or TxtTgl = 0 Or
TxtAlamat = "" Or TxtAgama = "" Or Pen = "" Or TxtPekerjaan = "" Or CboStatus = "" Then
MsgBox "Data harus lengkap!", vbExclamation + vbOKOnly, "Info"
Exit Sub
End If
With dbKTP.Recordset
If tambah = True Then
.AddNew
!NIK = TxtNIK.Text
!Nama = TxtNama.Text
!Jekel = CboJekel.Text
!Tmp_Lahir = TxtTempat.Text
!Tgl_Lahir = TxtTgl.Value
!Alamat = TxtAlamat.Text
!Agama = TxtAgama.Text
!Pekerjaan = TxtPekerjaan.Text
!Status = CboStatus.Text
.Update
Else
!Nama = TxtNama.Text
!Jekel = CboJekel.Text
!Tmp_Lahir = TxtTempat.Text
!Tgl_Lahir = TxtTgl.Value
!Alamat = TxtAlamat.Text
!Agama = TxtAgama.Text
!Pekerjaan = TxtPekerjaan.Text
!Status = CboStatus.Text
.Update
End If
End With
MsgBox "Data sudah di simpan!", vbInformation + vbOKOnly, "Info"
End Sub
Private Sub CmdKoreksi_Click()
Dim edit As String
edit = InputBox("Masukkan NIK..", "Edit", "")
dbKTP.Recordset.Find "NIK='" & edit & "'", , adSearchForward, 1
If dbKTP.Recordset.EOF Then
MsgBox "Record Kosong", vbInformation, ""
Exit Sub
Else
tambah = False
Call Aktif
Call Tampil
CmdSimpan.Enabled = True
End If
End Sub
Private Sub CmdCari_Click()
Dim cari As String
cari = InputBox("Masukan NIK", "cari", "")
4. dbKTP.Recordset.Find "NIK='" & cari & "'", , adSearchForward, 1
If dbKTP.Recordset.EOF Then
MsgBox "data tidak di temukan", vbInformation, "cari"
Else
Call Tampil
Exit Sub
End If
End Sub
Private Sub CmdHapus_Click()
Call Bersih
X = MsgBox("Yakin data ini akan di hapus?", vbOKCancel + vbExclamation, "Hapus")
If X = vbOK Then
dbKTP.Recordset.Delete
MsgBox "Data sudah di hapus!", vbInformation, "Info"
Else
Call Bersih
Call Aktif
End If
End Sub
Private Sub CmdKeluar_Click()
pesan = MsgBox("Yakin ingin keluar?", vbExclamation + vbYesNo, "Keluar")
If pesan = vbYes Then
Unload Me
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
cepat = 100
While Left + Width < Screen.Width
DoEvents
Left = Left + cepat
Wend
While Top - Height < Screen.Height
DoEvents
Top = Top + cepat
Wend
Hide
Unload Me
End Sub
Form KK..
5. Coding nya,,
Sub Aktif()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Enabled = True
If TypeOf a Is ComboBox Then a.Enabled = True
Next
End Sub
Sub Nonaktif()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Enabled = False
If TypeOf a Is ComboBox Then a.Enabled = False
Next
End Sub
Sub Bersih()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Text = ""
If TypeOf a Is ComboBox Then a.Text = ""
Next
End Sub
Private Sub CboKTP_Click()
dbKTP.RecordSource = "select* from KTP where NIK='" & CboKTP.Text & "'"
dbKTP.Refresh
TxtNama.Text = dbKTP.Recordset!Nama
TxtJekel.Text = dbKTP.Recordset!Jekel
TxtTempat.Text = dbKTP.Recordset!Tmp_Lahir
TxtTgl.Value = dbKTP.Recordset!Tgl_Lahir
TxtAlamat.Text = dbKTP.Recordset!Alamat
TxtAgama.Text = dbKTP.Recordset!Agama
TxtPekerjaan.Text = dbKTP.Recordset!Pekerjaan
TxtStatus.Text = dbKTP.Recordset!Status
'-----------------------------------------------------------
'MsgBox "Data Penduduk Dengan NIK '" & CboKTP.Text & "' Sudah Ada", vbInformation,
"Info" '<-- Pesan yang disisipkan
'-----------------------------------------------------------
Exit Sub
End Sub
Private Sub CmdBatal_Click()
Bersih
Nonaktif
End Sub
Private Sub CmdHapus_Click()
Call Bersih
X = MsgBox("Yakin data ini akan di hapus?", vbOKCancel + vbExclamation, "Hapus")
If X = vbOK Then
dbKK.Recordset.Delete
MsgBox "Data sudah di hapus!", vbInformation, "Info"
Else
Call Bersih
Call Aktif
End If
End Sub
Private Sub CmdKeluar_Click()
pesan = MsgBox("Yakin ingin keluar?", vbExclamation + vbYesNo, "Keluar")
6. If pesan = vbYes Then
Unload Me
End If
End Sub
Private Sub CmdKoreksi_Click()
End Sub
Private Sub CmdSimpan_Click()
dbKK.RecordSource = "select* from KK"
dbKK.Refresh
dbKK.Recordset.AddNew
dbKK.Recordset!NKK = TxtNKK
dbKK.Recordset!NIK = CboKTP
dbKK.Recordset.Update
MsgBox "Data Sudah Tersimpan!!!", vbInformation, "Konfirmas"
Bersih
Nonaktif
End Sub
Private Sub CmdTambah_Click()
tambah = True
Call Aktif
CmdSimpan.Enabled = True
Call Bersih
TxtNKK.SetFocus
End Sub
Private Sub Form_Load()
Me.dbKK.Refresh
With Me.dbKK.Recordset
If .RecordCount > 0 Then
.MoveFirst
Do While Not .EOF
.MoveNext
Loop
End If
End With
Combo_KTP
Bersih
Nonaktif
End Sub
Sub Combo_KTP()
dbKTP.RecordSource = "select NIK from ktp order by NIK"
dbKTP.Refresh
If dbKTP.Recordset.RecordCount = 0 Then
Exit Sub
Else
dbKTP.Recordset.MoveFirst
Do While Not dbKTP.Recordset.EOF
CboKTP.AddItem dbKTP.Recordset!NIK
dbKTP.Recordset.MoveNext
Loop
End If
End Sub
Private Sub TxtNKK_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
dbKK.RecordSource = "select* from KK where NKK='" & TxtNKK.Text & "'"
dbKK.Refresh
7. dbKK.Recordset.Find "NKK='" & TxtNKK.Text & "'", , adSearchBackward, 1
If dbKK.Recordset.EOF Then
CboKTP.Text = ""
CboKTP.SetFocus
TxtNama.Text = ""
TxtJekel.Text = ""
TxtTempat.Text = ""
TxtAlamat.Text = ""
TxtAgama.Text = ""
TxtPekerjaan.Text = ""
TxtStatus.Text = ""
CmdSimpan.Enabled = True
Else
CboKTP.Text = dbKK.Recordset!NIK
dbKTP.RecordSource = "select * from KTP" ' where NIK='" & CboKTP.Text & "'"
dbKTP.Refresh
dbKTP.Recordset.Find "Nik='" & CboKTP.Text & "'", , adSearchBackward, 1
If dbKTP.Recordset.EOF Then
CmdSimpan.Enabled = False
Exit Sub
Else
TxtNama.Text = dbKTP.Recordset!Nama
TxtJekel.Text = dbKTP.Recordset!Jekel
TxtTempat.Text = dbKTP.Recordset!Tmp_Lahir
TxtTgl.Value = dbKTP.Recordset!Tgl_Lahir
TxtAlamat.Text = dbKTP.Recordset!Alamat
TxtAgama.Text = dbKTP.Recordset!Agama
TxtPekerjaan.Text = dbKTP.Recordset!Pekerjaan
TxtStatus.Text = dbKTP.Recordset!Status
End If
CmdSimpan.Enabled = False
End If
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
cepat = 100
While Left + Width < Screen.Width
DoEvents
Left = Left + cepat
Wend
While Top - Height < Screen.Height
DoEvents
Top = Top + cepat
Wend
Hide
Unload Me
End Sub
8. Transaksi
Coding transaksi
Sub Aktif()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Enabled = True
If TypeOf a Is ComboBox Then a.Enabled = True
Next
End Sub
Sub Nonaktif()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Enabled = False
If TypeOf a Is ComboBox Then a.Enabled = False
Next
End Sub
Sub Bersih()
Dim a As Control
For Each a In Me
If TypeOf a Is TextBox Then a.Text = ""
If TypeOf a Is ComboBox Then a.Text = ""
Next
End Sub
Private Sub CboKK_Click()
dbKK.RecordSource = "select* from KK where NKK='" & CboKK.Text & "'"
dbKK.Refresh
End Sub
Private Sub CboKTP_Click()
dbKTP.RecordSource = "select* from KTP where NIK='" & CboKTP.Text & "'"
dbKTP.Refresh
TxtNama.Text = dbKTP.Recordset!Nama
TxtJekel.Text = dbKTP.Recordset!Jekel
TxtTempat.Text = dbKTP.Recordset!Tmp_Lahir
TxtTgl.Value = dbKTP.Recordset!Tgl_Lahir
TxtAlamat.Text = dbKTP.Recordset!Alamat
TxtAgama.Text = dbKTP.Recordset!Agama
TxtPekerjaan.Text = dbKTP.Recordset!Pekerjaan
TxtStatus.Text = dbKTP.Recordset!Status
End Sub
Private Sub CmdBatal_Click()
Bersih
9. Nonaktif
End Sub
Private Sub CmdHapus_Click()
Call Bersih
X = MsgBox("Yakin data ini akan di hapus?", vbOKCancel + vbExclamation, "Hapus")
If X = vbOK Then
dbTransaksi.Recordset.Delete
MsgBox "Data sudah di hapus!", vbInformation, "Info"
Else
Call Bersih
Call Aktif
End If
End Sub
Private Sub CmdKeluar_Click()
pesan = MsgBox("Yakin ingin keluar?", vbExclamation + vbYesNo, "Keluar")
If pesan = vbYes Then
Unload Me
End If
End Sub
Private Sub CmdSimpan_Click()
dbTransaksi.RecordSource = "select* from Transaksi"
dbTransaksi.Refresh
dbTransaksi.Recordset.AddNew
dbTransaksi.Recordset!NKK = CboKK
dbTransaksi.Recordset!NIK = CboKTP
dbTransaksi.Recordset!SDK = TxtSDK
dbTransaksi.Recordset!Nama1 = TxtNama1
dbTransaksi.Recordset!Nama2 = TxtNama2
dbTransaksi.Recordset!Kewarganegaraan = TxtKewarganegaraan
dbTransaksi.Recordset.Update
MsgBox "Data Sudah Tersimpan!!!", vbInformation, "Konfirmas"
Bersih
Nonaktif
End Sub
Private Sub CmdTambah_Click()
Bersih
Aktif
End Sub
Private Sub Form_Load()
Me.dbTransaksi.Refresh
With Me.dbTransaksi.Recordset
If .RecordCount > 0 Then
.MoveFirst
Do While Not .EOF
.MoveNext
Loop
End If
End With
Combo_KK
Combo_KTP
Bersih
Nonaktif
End Sub
Sub Combo_KK()
dbKK.RecordSource = "select NKK from KK order by NKK"
dbKK.Refresh
10. If dbKK.Recordset.RecordCount = 0 Then
Exit Sub
Else
dbKK.Recordset.MoveFirst
Do While Not dbKK.Recordset.EOF
CboKK.AddItem dbKK.Recordset!NKK
dbKK.Recordset.MoveNext
Loop
End If
End Sub
Sub Combo_KTP()
dbKTP.RecordSource = "select NIK from ktp order by NIK"
dbKTP.Refresh
If dbKTP.Recordset.RecordCount = 0 Then
Exit Sub
Else
dbKTP.Recordset.MoveFirst
Do While Not dbKTP.Recordset.EOF
CboKTP.AddItem dbKTP.Recordset!NIK
dbKTP.Recordset.MoveNext
Loop
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
cepat = 100
While Left + Width < Screen.Width
DoEvents
Left = Left + cepat
Wend
While Top - Height < Screen.Height
DoEvents
Top = Top + cepat
Wend
Hide
Unload Me
End Sub
Seperti inilah menu utama nya bila di RUN,,,
Menu Utama
11. Coding menu utama
Dim i As Long
Dim merah, hijau, biru, yellow, magenta, hitam As Integer
Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As
Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As
Long
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As
Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As
Long, ByVal bRedraw As Boolean) As Long
Dim Pos As Integer, StartPos As Integer, Lengh As Integer, iTeks As Integer
Dim MyTeks As String
Private Sub DFGDG_Click()
Shell "calc.exe", vbMaximizedFocus
End Sub
Private Sub DFSDF_Click()
pesan = MsgBox("Yakin ingin keluar?", vbExclamation + vbYesNo, "Keluar")
If pesan = vbYes Then
Unload Me
End If
End Sub
Private Sub DFSFD_Click()
CrystalReport1.ReportFileName = App.Path & "LaporanDataPenduduk.rpt"
CrystalReport1.DataFiles(0) = App.Path & "PENDUDUK.mdb"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
End Sub
Private Sub FDSFFFS_Click()
Trans.Show
End Sub
Private Sub FSFGF_Click()
KK.Show
End Sub
Private Sub FSFS_Click()
tt.Show
End Sub
Private Sub HTHYR_Click()
CD1.ShowOpen
men.Picture = LoadPicture(CD1.FileName)
End Sub
Private Sub Timer1_Timer()
Static Count As Integer
If (Label2.Left + Label2.Width) <= 0 Then
Label2.Left = Form1.Width
Count = Count + 1
End If
Label2.Left = Label2.Left - 200
End Sub
Private Sub Timer2_Timer()
i = i + 1
12. If i = 1000000 Then i = 0
hijau = Int(255 * Rnd)
biru = Int(255 * Rnd)
yellow = Int(255 * Rnd)
hitam = Int(255 * Rnd)
Label2.ForeColor = RGB(biru, merah, hijau)
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next
Select Case Button.Index
Case 3
tt.Show
Case 4
KK.Show
Case 5
Trans.Show
Case 7
CrystalReport1.ReportFileName = App.Path & "LaporanDataPenduduk.rpt"
CrystalReport1.DataFiles(0) = App.Path & "PENDUDUK.mdb"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
Case 9
pesan = MsgBox("Yakin ingin keluar?", vbExclamation + vbYesNo, "Keluar")
If pesan = vbYes Then
Unload Me
End If
End Select
End Sub
Rancang Laporan nya dengan menggunakan Cristal Report 8.5
Seperti ini lah bentuk laporan nya..
Ok Gan,,,
Slamat Mencoba ya..