LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

Similar documents
LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN LIST PROGRAM

LAMPIRAN A : LISTING PROGRAM

Visual Basic 6 Lecture 7. The List Box:

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub

LISTING PROGRAM. Form Splash

Tutorial, Source code, Request Program Visual Basic

ต วอย างการสร างฟอร ม เมน การใช งาน

22. VB Programming Fundamentals Data Access with Data Objects

PROGRAM 1: SIMPLE CALCULATOR

Private Sub Command2_Click() End End Sub. Private Sub Command3_Click() frmchangepassword.show End Sub. Private Sub Form_Activate() check_db End Sub

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub

LISTING PROGRAM. 1. Menu Utama

LAMPIRAN : LISTING PROGRAM

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

L A M P I R A N. Universitas Sumatera Utara

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.


KARTU BIMBINGAN TUGAS AKHIR MAHASISWA PEMBAHASAN PADA ASISTENSI MENGENAI, PADA BAB

LISTING PROGRAM. 1. Form Menu Utama. Universitas Sumatera Utara

The Control Properties

LAMPIRAN 1. Kode Program Splash Screen

LISTING PROGRAM. 1. Menu Utama

Angel International School - Manipay 1 st Term Examination November, 2015

LAMPIRAN A LISTING PROGRAM. Universitas Sumatera Utara

HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x

Relational Operators. > greater than < less than >= greater than or equal to <= less than or equal to <> not equal to = equal to

Function: function procedures and sub procedures share the same characteristics, with

LAMPIRAN. Universitas Sumatera Utara

Remainder Cordial Labeling of Graphs

1. Menu Utama. Private Sub abt_click() frmabout.show End Sub. Private Sub dafabsenhar_click() frmdafabsensihar.show End Sub

Chapter 1. Block Diagram. Text .. 1

On Railway Reservation. U G D C A Semester VI. Roll No DA

Angel International School - Manipay 1 st Term Examination November, 2015

Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer

Please answer questions in the space provided. Question point values are shown in parentheses.

EMPLOYEE PAYROLL SYSTEM

2-26 Learn Visual Basic 6.0

Universitas Sumatera Utara

Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

Financial Functions (all with subtypes: Normal, Stairs, Points, Height, Hollow, Colors, Marks, No Border except where indicated):

LISTING PROGRAM. Source Code Tampilan Awal. Source Code Menu Utama

Visual Basic Visual Basic

ISA PCI Peripherals Connect Interface ISA. Enhanced Parallel Port EPP

Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub

The design and implementation of UML-based students information management system

Lecture Using ListBox and ComboBox Controls In Visual Basic 6: list box

ONLINE RAILWAY RESERVATION SYSTEM

LANGKAH INSTALASI ireport Jasper,XAMMP Add On Tomcat & Oracle 2011

Crystal Reports. Overview. Contents. Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic

LAMPIRAN A: LISTING PROGRAM

L A M P I R A N. Universitas Sumatera Utara

Programming with visual Basic:

Password Protect an Access Database

L A M P I R A N. Universitas Sumatera Utara

2Practicals Visual Basic 6.0

Catalyst Development Corporation An Introduction to TCP/IP Programming With SocketWrench

Experiment No. 2. Program:

Manual Pengguna. PCN Online Service Fulfillment System

NEAR EAST UNIVERSITY FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCE DEPARTMENT OF COMPUTER INFORMATION SYSTEMS

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

PROGRAM BASCOM AVR. ' inisialisasi '

Lampiran A : Listing Program

LISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab.

Tech-Talk Using the PATROL Agent COM Server August 1999 Authored By: Eric Anderson

LAMPIRAN A LISTING PROGRAM

Control Properties. Example: Program to change background color

Leveraging MapInfo ProViewer with Microsoft Visual Basic to provide company-wide access to spatial data resources.

CMPT 110 MIDTERM OCTOBER 18, 2001

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

Panduan Menggunakan Autoresponder FreeAutobot.com

LAMPIRAN A : LISTING PROGRAM

File Organization and Management

LAMPIRAN. Universitas Sumatera Utara

NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL

PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM

Information Hiding In Images Using Randomly Selected Points

LISTING PROGRAM. PrivateSub KeluarToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles KeluarToolStripMenuItem.Click Close() EndSub

Nilai Input (Peringkat Alternatif Fuzzy dan Crisp Terhadap Kriteria)

LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function:

Design of Remote Health Monitoring System Client

Generated by Foxit PDF Creator Foxit Software For evaluation only. ภาคผนวก ก

19. VB Project and Menu Design

SEBARAN MATAKULIAH PROGRAM STUDI SARJANA TEKNIK SIPIL (S1) DI JURUSAN TEKNIK SIPIL UNIVERSITAS LAMPUNG

IS 320 A/B Spring 97 Page 1 Exam 1

Visual Basic

Visual Basic. The Integrated Development Environment. Menu Bar

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

DAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England

BORANG PENCALONAN HADIAH UNIVERSITI NOMINATION FORM FOR UNIVERSITY AWARD

Allow local or remote applications to access the functionality in the VisualCron server through an easy to use interface.

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

A Back-End Link Checker for Your Access Database

LAMPIRAN - A. Instruksi Mikrokontroler

SURAT KETERANGAN Hasil Uji Program Tugas Akhir

Visual Basic ,

Transcription:

LAMPIRAN FORM 1 Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = vbkeyreturn Then Set tbladministrator = New ADODB.Recordset With tbladministrator.open "SELECT * FROM Administrator WHERE userid = '" & Trim(Text1.Text) & "' ", _Conn,,, adcmdtext 'MsgBox tbladministrator("passid") If tbladministrator.eof Then MsgBox ("UserID tidak ditemukan!") Text1.Text = "" Text2.Text = "" Text1.SetFocus If Text2.Text = tbladministrator("passid") Then If Text1.Text = "admin" Then MsgBox "Selamat datang di Election Channel, " & tbladministrator("userid"),, ";) Information" MDIForm1.Show

MsgBox "Selamat datang di Election Channel, " & tbladministrator("userid"),, ";) Information" MDIForm1.mnlaporan.Enabled = False MDIForm1.mndata.Enabled = False MDIForm1.Show MsgBox "PassID anda salah!" Text2.Text = "" Text2.SetFocus 'tbladministrator.close Private Sub Timer1_Timer() Label2.Caption = Right(Label2.Caption, Len(Label2.Caption) - 1) & Left(Label2.Caption, 1) FORM 2 Sub awal() For a = 1 To 31 Step 1 Combo1.AddItem a Next a For b = 1 To 12 Step 1 Combo2.AddItem b

Next b For c = 1970 To 2045 Step 1 Combo3.AddItem c Next c Combo4.AddItem ("Islam") Combo4.AddItem ("Katolik") Combo4.AddItem ("Protestan") Combo4.AddItem ("Hindu") Combo4.AddItem ("Budha") Combo4.AddItem ("Konghu Chu") Combo5.AddItem ("Pria") Combo5.AddItem ("Wanita") Combo6.AddItem ("A") Combo6.AddItem ("B") Combo6.AddItem ("AB") Combo6.AddItem ("O") RichTextBox1.Text = "" Image1.Picture = Nothing Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Private Sub Command1_Click()

If Command1.Caption = "T A M B A H" Then Set tblcalon = New ADODB.Recordset With tblcalon.open "SELECT * FROM Calon", _Conn,,, adcmdtext If tblcalon.recordcount >= 5 Then MsgBox "Calon Ketua Organisasi sudah penuh (5 calon)!" Exit Sub Tambah = InputBox("Masukan No. Anggota? ", "Tambah calon Ketua Organisasi!") Set tblcalon = New ADODB.Recordset With tblcalon.open "SELECT * FROM Calon WHERE No_Anggota = '" & Trim(Tambah) & "' ", _Conn,,, adcmdtext If Not tblcalon.eof Then MsgBox "Maaf, data sudah ada!" Command1.Caption = "S I M P A N" awal Text2.SetFocus Text1.Text = Tambah

Set tblcalon = New ADODB.Recordset With tblcalon.open "SELECT * FROM Calon", _Conn,,, adcmdtext With tblcalon.addnew!no_anggota = Text1.Text!nama = Text2.Text!Tgl_Lahir = Combo1.Text & "/" & Combo2.Text & "/" & Combo3.Text!Agama = Combo4.Text!Jns_Kelamin = Combo5.Text!Alamat = Text3.Text!Gol_Darah = Combo6.Text!Jabatan = Text4.Text!Hobby = Text5.Text!Quote = RichTextBox1.Text!photo = Text6.Text.Update '.Close MsgBox ("Data telah tersimpan!") awal Private Sub Command2_Click() Set tblcalon = New ADODB.Recordset With tblcalon

.Open "SELECT * FROM Calon WHERE No_Anggota = '" & Trim(Text1.Text) & "' ", _Conn,,, adcmdtext With tblcalon!no_anggota = Text1.Text!nama = Text2.Text!Tgl_Lahir = Combo1.Text & "/" & Combo2.Text & "/" & Combo3.Text!Agama = Combo4.Text!Jns_Kelamin = Combo5.Text!Alamat = Text3.Text!Gol_Darah = Combo6.Text!Jabatan = Text4.Text!Hobby = Text5.Text!Quote = RichTextBox1.Text!photo = Text6.Text.Update '.Close MsgBox ("Data telah diupdate!") Private Sub Command3_Click() cari = InputBox("Masukan Kode Anggota? ", "Mencari Kode Anggota Calon") Set tblcalon = New ADODB.Recordset With tblcalon

.Open "SELECT * FROM Calon WHERE No_Anggota = '" & Trim(cari) & "' ", _Conn,,, adcmdtext If tblcalon.eof Then MsgBox "Maaf, data tidak ditemukan!" With tblcalon Text1.Text =!no_anggota Text2.Text =!nama Combo1.Text = Mid(!Tgl_Lahir, 4, 2) Combo2.Text = Left(!Tgl_Lahir, 2) Combo3.Text = Right(!Tgl_Lahir, 4) Combo4.Text =!Agama Combo5.Text =!Jns_Kelamin Text3.Text =!Alamat Combo6.Text =!Gol_Darah Text4.Text =!Jabatan Text5.Text =!Hobby RichTextBox1.Text =!Quote Image1.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text6.Text =!photo.close Private Sub Command4_Click() Set tblcalon = New ADODB.Recordset With tblcalon

.Open "SELECT * FROM Calon WHERE No_Anggota = '" & Trim(Text1.Text) & "' ", _Conn,,, adcmdtext.delete awal MsgBox "data telah dihapus!" Private Sub Form_Load() awal ' Private Sub Image1_Click() On Error Resume Next With CommonDialog1.InitDir = App.Path & "\Photo".ShowOpen a =.FileTitle If Not (a Is Nothing) Then Text6.Text = a Image1.Picture = LoadPicture(App.Path & "\Photo\" & a) Exit Sub FORM 3

Sub startawal() For a = 1 To 31 Step 1 Combo1.AddItem a Next a For b = 1 To 12 Step 1 Combo2.AddItem b Next b For c = 1970 To 2045 Step 1 Combo3.AddItem c Next c Combo4.AddItem ("Islam") Combo4.AddItem ("Katolik") Combo4.AddItem ("Protestan") Combo4.AddItem ("Hindu") Combo4.AddItem ("Budha") Combo4.AddItem ("Konghu Chu") Combo5.AddItem ("Pria") Combo5.AddItem ("Wanita") 'Combo1.ItemData (1) 'Combo2.TopIndex 'Combo3.TopIndex 'Combo4.TopIndex 'Combo5.TopIndex Text1.Text = "" Text2.Text = "" Text3.Text = ""

Text6.Text = "" Private Sub Command1_Click() If Command1.Caption = "T A M B A H" Then Tambah = InputBox("Masukan No. Anggota? ", "Tambah calon Anggota Organisasi!") Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih WHERE No_Anggota = '" & Trim(Tambah) & "' ", _Conn,,, adcmdtext If Not tblpemilih.eof Then MsgBox "Maaf, data sudah ada!" Command1.Caption = "S I M P A N" startawal Text2.SetFocus Text1.Text = Tambah Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih", _Conn,,, adcmdtext With tblpemilih

.AddNew!no_anggota = Text1.Text!nama = Text2.Text!Tgl_Lahir = Combo1.Text & "/" & Combo2.Text & "/" & Combo3.Text!Agama = Combo4.Text!Jns_Kelamin = Combo5.Text!Alamat = Text3.Text '!Jabatan = Combo6.Text!Jabatan = Text6.Text '!Hobby = Text5.Text '!Quote = RichTextBox1.Text '!photo = Text6.Text.Update '.Close MsgBox ("Data telah tersimpan!") startawal Private Sub Command2_Click() If Text1.Text = "" Then Exit Sub Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih WHERE No_Anggota = '" & Trim(Text1.Text) & "' ", _Conn,,, adcmdtext.delete

startawal MsgBox "data telah dihapus!" Private Sub Command3_Click() Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih WHERE No_Anggota = '" & Trim(Text1.Text) & "' ", _Conn,,, adcmdtext With tblpemilih!no_anggota = Text1.Text!nama = Text2.Text!Tgl_Lahir = Combo1.Text & "/" & Combo2.Text & "/" & Combo3.Text!Agama = Combo4.Text!Jns_Kelamin = Combo5.Text!Alamat = Text3.Text '!Gol_Darah = Combo6.Text!Jabatan = Text6.Text '!Hobby = Text5.Text '!Quote = RichTextBox1.Text '!photo = Text6.Text.Update '.Close MsgBox ("Data telah diupdate!")

Private Sub Command4_Click() cari = InputBox("Masukan Kode Anggota? ", "Mencari Kode Anggota") Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih WHERE No_Anggota = '" & Trim(cari) & "' ", _Conn,,, adcmdtext If tblpemilih.eof Then MsgBox "Maaf, data tidak ditemukan!" With tblpemilih Text1.Text =!no_anggota Text2.Text =!nama Combo1.Text = Mid(!Tgl_Lahir, 4, 2) Combo2.Text = Left(!Tgl_Lahir, 2) Combo3.Text = Right(!Tgl_Lahir, 4) Combo4.Text =!Agama Combo5.Text =!Jns_Kelamin Text3.Text =!Alamat 'Combo6.Text =!Gol_Darah Text6.Text =!Jabatan 'Text5.Text =!Hobby 'RichTextBox1.Text =!Quote 'Image1.Picture = LoadPicture(App.Path & "\Photo\" &!photo) 'Text6.Text =!photo.close

Private Sub Form_Load() startawal FORM 4 Private Sub Form_Activate() Dim i As Integer Set tblcalon = New ADODB.Recordset With tblcalon.open "SELECT * FROM Calon", _Conn,,, adcmdtext tblcalon.movefirst 'For i = 0 To tblcalon.recordcount With tblcalon Image1.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text1(0).Text =!nama tblcalon.movenext Image2.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text1(4).Text =!nama tblcalon.movenext Image3.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text1(1).Text =!nama tblcalon.movenext Image4.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text1(2).Text =!nama tblcalon.movenext

Image5.Picture = LoadPicture(App.Path & "\Photo\" &!photo) Text1(3).Text =!nama 'tblcalon.movenext 'Next i Private Sub Image1_Click() Set tblsuara = New ADODB.Recordset With tblsuara.open "SELECT * FROM Suara WHERE No_Anggota = '" & Trim(Text2.Text) & "' ", _Conn,,, adcmdtext If Not tblsuara.eof Then MsgBox "Anda sudah memilih!" Exit Sub With tblsuara.addnew!no_anggota = Text2.Text!pilihan = Text1(0).Text!Tgl = Format(Now, "dd/mm/yyyy")!jam = Format(Now, "hh:mm:ss").update '.Close MsgBox ("Terima Kasih telah memilih!")

Private Sub Image2_Click() Set tblsuara = New ADODB.Recordset With tblsuara.open "SELECT * FROM Suara WHERE No_Anggota = '" & Trim(Text2.Text) & "' ", _Conn,,, adcmdtext If Not tblsuara.eof Then MsgBox "Anda sudah memilih!" Exit Sub With tblsuara.addnew!no_anggota = Text2.Text!pilihan = Text1(4).Text!Tgl = Format(Now, "dd/mm/yyyy")!jam = Format(Now, "hh:mm:ss").update '.Close MsgBox ("Terima Kasih telah memilih!") Private Sub Image3_Click()

Set tblsuara = New ADODB.Recordset With tblsuara.open "SELECT * FROM Suara WHERE No_Anggota = '" & Trim(Text2.Text) & "' ", _Conn,,, adcmdtext If Not tblsuara.eof Then MsgBox "Anda sudah memilih!" Exit Sub With tblsuara.addnew!no_anggota = Text2.Text!pilihan = Text1(1).Text!Tgl = Format(Now, "dd/mm/yyyy")!jam = Format(Now, "hh:mm:ss").update '.Close MsgBox ("Terima Kasih telah memilih!") Private Sub Image4_Click() Set tblsuara = New ADODB.Recordset With tblsuara

.Open "SELECT * FROM Suara WHERE No_Anggota = '" & Trim(Text2.Text) & "' ", _Conn,,, adcmdtext If Not tblsuara.eof Then MsgBox "Anda sudah memilih!" Exit Sub With tblsuara.addnew!no_anggota = Text2.Text!pilihan = Text1(2).Text!Tgl = Format(Now, "dd/mm/yyyy")!jam = Format(Now, "hh:mm:ss").update '.Close MsgBox ("Terima Kasih telah memilih!") Private Sub Image5_Click() Set tblsuara = New ADODB.Recordset With tblsuara.open "SELECT * FROM Suara WHERE No_Anggota = '" & Trim(Text2.Text) & "' ", _Conn,,, adcmdtext

If Not tblsuara.eof Then MsgBox "Anda sudah memilih!" Exit Sub With tblsuara.addnew!no_anggota = Text2.Text!pilihan = Text1(3).Text!Tgl = Format(Now, "dd/mm/yyyy")!jam = Format(Now, "hh:mm:ss").update '.Close MsgBox ("Terima Kasih telah memilih!") MDIFORM 1 Private Sub datacalon_click() Form2.Show Private Sub datapemilih_click() Form3.Show Private Sub laporancalon_click() 'Dim crlapp As New CRAXDRT.Application 'Dim crlrep As CRAXDRT.Report

'Set crlrep = crlapp.openreport(app.path & "\report1.rpt") 'Set CrystalReportViewer.ReportSource = crlrep 'CrystalReportViewer.ViewReport Private Sub laporanhasil_pilihan_click() 'Dim crlapp As New CRAXDRT.Application 'Dim crlrep As CRAXDRT.Report 'Set crlrep = crlapp.openreport(app.path & "\report3.rpt") 'Set CrystalReportViewer.ReportSource = crlrep 'CrystalReportViewer.ViewReport Private Sub laporanpemilih_click() 'Dim crlapp As New CRAXDRT.Application 'Dim crlrep As CRAXDRT.Report 'Set crlrep = crlapp.openreport(app.path & "\report2.rpt") 'Set CrystalReportViewer.ReportSource = crlrep 'CrystalReportViewer.ViewReport Private Sub mnexit_click()

Private Sub mnsuara_click() pilihan = InputBox("Masukan No. anggota anda?") Set tblpemilih = New ADODB.Recordset With tblpemilih.open "SELECT * FROM Pemilih WHERE No_Anggota = '" & Trim(pilihan) & "' ", _Conn,,, adcmdtext If Not tblpemilih.eof Then Form4.Show Form4.Text2.Text = pilihan MsgBox "Anda tidak terdaftar!" Exit Sub Private Sub mntentang_click() Form5.Show MODULE 1 Global _Conn As ADODB.Connection Sub () Set _Conn = New ADODB.Connection Set tbladministrator = New ADODB.Recordset Set tblcalon = New ADODB.Recordset Set tblpemilih = New ADODB.Recordset Set tblsuara = New ADODB.Recordset

With _Conn.Provider = "Microsoft.Jet.Oledb.4.0".CursorLocation = aduseclient.open App.Path & "\Election.mdb"