Anda di halaman 1dari 44

TUGAS KELOMPOK

APLIKASI DATABASE PADA SISTEM INFORMASI PERSEWAAN MOBIL PLAMONGAN RENTCAR


Mata Kuliah Dosen Pengampu : Data Base : Much. Aziz Muslim, S.Kom, M.Kom

Disusun oleh: 1. 2. 3. 4. 5. Nadia Pradyta N. I Lisa Noorwahyuni Wahyu Hartanti H Ika Nur Izzah Neti Sarofa (4101406570) (4101406578) (4101406580) (4101406589) (4101406592)

JURUSAN MATEMATIKA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM UNIVERSITAS NEGERI SEMARANG 2010

BAB I PENDAHULUAN

A. Latar Belakang Teknologi informasi merupakan salah satu teknologi yang sedang berkembang dengan pesat pada saat ini. Dengan kemajuan teknologi informasi, pengaksesan terhadap data atau informasi yang tersedia dapat berlangsungdengan cepat, efisien serta akurat. Contoh dari hasil kemajuan teknologi informasi adalah berkembangnya jaringan Internet yang memungkinkan seluruh umat manusia di seluruh dunia menggunakan data-data yang tersedia atau terhubung dalam jaringan tersebut secara bersama-sama. Sektor pembangunan yang sedang mendapat perhatian besar dari pemerintah merupakan salah satu sektor pembangunan yang sangat potensial untuk dapat diintegrasikan dengan kehadiran teknologi informasi. Salah satu contoh aplikasi teknologi informasi di bidang kesehatan adalah dengan mengimplementasikan suatu sistem jaringan kesehatan global dalam satu komunitas, yang dapat berbasis pada local area network, metropolitan area network maupun wide area network. B. Rumusan Masalah Dalam penyusunan makalah ini, maka dapat dirumuskan permasalahan sebagai berikut: 1. 2. 3. Bagaimana bentuk basis data sistem informasi persewaan mobil ? Bagaimana program Microsoft Visual Basic dan Microsoft Acces Bagaimana output sistem informasi persewaan mobil?

pada sistem informasi persewaan mobil?

C. Tujuan dan Manfaat Tujuan dan Manfaat dari makalah ini antara lain adalah: 1. mobil. 2. 3. Untuk mengetahui program Microsoft Visual Basic dan Microsoft Untuk mengetahui output sistem informasi persewaan mobil. Acces pada sistem informasi persewaan mobil. Untuk mengetahui bentuk basis data sistem informasi persewaan

BAB II PEMBAHASAN

1.

Gambaran Umum Database Persewaan Mobil Kegiatan manajemen di persewaan mobil memuat registrasi, daftar-

pegawai, daftar pelanggan yang digolongkan sebagai database. Pada dasarnya suatu database adalah kumpulan data/informasi yang diorganisasikan dan saling berhubungan. Kegiatan di persewaan mobil tidak lepas dari data-data yang dapat berubah sewaktu-waktu dengan jumlah data yang besar. Perubahan data tersebut harus tersimpan dengan baik. Data yang ada berupa setumpuk kertas atau rekaman yang disimpan dalam rak-rak berkas. Seiring dengan kemajuan teknologi, komputer merupakan produk teknologi yang mampu memecahkan masalah bukan hanya dalam segi perhitungan tetapi juga dalam kemampuannya menyimpan dan memberikan informasi. Walaupun demikian dalam masyarakat modern komputer lebih banyak dimanfaatkan sebagai pusat data (database) dibanding penggunaan lainnya. Perkembangan basis data tidak lepas dari perkembangan perangkat keras dan perangkat lunak. Salah satu perangkat lunak pengembangan aplikasi yang popular adalah Microsoft Visual Basic 6.0. Bahasa pemrograman Microsoft Visual Basic 6.0 berbasis Microsoft Windows, sebagai bahasa pemrograman yang mutakhir, Microsoft Visual Basic 6.0 didesain untuk dapat memanfaatkan fasilitas yang tersedia dalam Microsoft Windows. Penggunaan bahasa pemrograman Visual Basic dalam penanganan basis data merupakan kemajuan teknologi dalam perkembangan basis data. Database persewaan mobil terdiri dari data-data yang dibutuhkan untuk kelancaran petugas dalam menjalankan tugasnya. Data-data yang dibutuhkan antara lain sebagai berikut :

1.

Data pelanggan Berfungsi untuk mengetahui pelanggan pinjam tanggal berapa, tang-

gal pengembalian berapa, lama sewa, biaya peminjaman dan untuk mengetahui data-data yang berkaitan dengan pelanggan. 2. Data karyawan/pegawai Berfungsi untuk mengetahui data-data tentang karyawan persewaan mobil dan untuk mengetahui jabatan karyawan tertentu.

2.

Program Database Sistem Informasi Persewaan Mobil Tampilan Form Menu Login

dengan Microsoft Visual Basic 6.0.

Gambar 1: Login

Gambar 1 Pada saat program dijalankan tampilan pertama yang akan muncul adalah form LOGIN seperti gambar 1. Dalam form ini terdapat 3 Command button untuk menjalankan program. Antara lain: a. LOGIN

Pada command login ini difungsikan untuk: 1) Jika pada LOGIN diklik maka akan muncul pesan seperti di bawah ini:

2) Apabila pengguna belum mengetahui username untuk program ini,dan pengguna menulis sembarang maka akan muncul peringatan seperti di bawah ini:

3) Karena program ini adalah program aplikasi. Maka operator memasukkan username dan password. Jika operator salah dalam menuliskan password. Maka akan muncul peringatan seperti dibawah ini:

b.

KLIK DISINI Command ini berfungsi untuk mendaftar dalam menjalankan program ini atau untuk mengingat password jika lupa..

c.

KELUAR Command ini untuk keluar dari program atau mengakhiri program.

Tampilan Form Menu Ubah

Tampilan Form Menu Utama

Tampilan Form Input Data Pegawai

Tampilan Form Input Data Pelanggan

Tampilan Form Input Biaya

Tampilan Form Edit Pegawai

Tampilan Form Edit Data Pelanggan

Tampilan form Programmer

Form Data Report

BAB III PENUTUP

A. Simpulan Dengan melihat permasalahan dan pembahasan maka kita dapat menyimpulkan beberapa hal yaitu sebagai berikut: 1. Dari basis data sistem informasi persewaan mobil dapat disimpulkan bah-wa tabel induk terdiri dari tabel pelanggan dan tabel pegawai atau karyawan. 2. Program Microsoft Visual Basic dan Microsoft Acces pada sistem infor-masi persewaan mobil bisa dilihat pada pembahasan dan setelah meng-gunakan aplikasi tersebut, sistem informasi persewaan mobil lebih efektif dan efisien. 3. Ouput dari sistem informasi persewaan mobil diperoleh data pelanggan, data pegawai atau karyawan. B. Saran 1. Untuk membuat sebuah database diperlukan ketelitian dan ketekunan agar database yang dibuat hasilnya benar dan bagus. 2. Untuk membuat database sistem persewaan mobil harus mengetahui data mana saja yang ada didalamnya seperti data pelanggan, data pegawai atau karyawan.

FORM 1 (DATA PELANGGAN) Sub KOSONG() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text8.Text = "" Text10.Text = "" Combo1.Text = "" Combo2.Text = "" Combo3.Text = "" Combo4.Text = "" Combo5.Text = "" Combo6.Text = "" Combo7.Text = "" Combo8.Text = "" Combo9.Text = "" Combo10.Text = "" End Sub Sub aktif() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text8.Enabled = True Text10.Enabled = True Combo1.Enabled = True Combo2.Enabled = True Combo3.Enabled = True Combo4.Enabled = True Combo5.Enabled = True Combo6.Enabled = True Combo7.Enabled = True Combo8.Enabled = True Combo9.Enabled = True Combo10.Enabled = True End Sub Sub pasif() Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False

Text8.Enabled = False Text10.Enabled = False Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False Combo5.Enabled = False Combo6.Enabled = False Combo7.Enabled = False Combo8.Enabled = False Combo9.Enabled = False Combo10.Enabled = False End Sub Private Sub Combo1_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo2.SetFocus End If End Sub Private Sub Combo10_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Text4.SetFocus End If End Sub Private Sub Combo2_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo3.SetFocus End If End Sub Private Sub Combo3_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Combo4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo5.SetFocus End If End Sub Private Sub Combo5_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo6.SetFocus End If End Sub

Private Sub Combo6_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo7.SetFocus End If End Sub Private Sub Combo7_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo8.SetFocus End If End Sub Private Sub Combo8_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo9.SetFocus End If End Sub

Private Sub Combo9_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then Combo10.SetFocus End If End Sub Private Sub Command1_Click() aktif KOSONG Text1.SetFocus Command2.Enabled = True Command1.Enabled = False End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or _ Text4.Text = "" Or Combo5.Text = "" Or _ Text8.Text = "" Or Combo1.Text = "" Or Combo2.Text = "" Or Combo3.Text = "" Or _ Combo6.Text = "" Or Combo7.Text = "" Or Combo8.Text = "" Or _ Combo9.Text = "" Or Combo10.Text = "" Or _ Combo4.Text = "" Or Text8.Text = "" Or Text10.Text = "" Then PESAN = MsgBox("There are data which not yet loaded!", vbQuestion, "MESSAGE") Text1.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text1 If Not .NoMatch Then

PESAN = MsgBox("ID " + Text1.Text + " have been filled!", vbQuestion, "MESSAGE") Text1.Text = "" Text1.SetFocus End If End With With Data1.Recordset On Error Resume Next .AddNew !ID = Text1.Text !NAMA = Text2.Text !TEMPAT = Text3.Text !ALAMAT = Text4.Text !Pekerjaan = Text8.Text !TELP = Text10.Text !KELAMIN = Combo4.Text !TANGGAL = Combo2 & "-" & Combo1 & "-" & Combo3 !MASUK = Combo5 & "-" & Combo6 & "-" & Combo7 !KELUAR = Combo8 & "-" & Combo9 & "-" & Combo10 .Update PESAN = MsgBox("Data have Saved!", vbQuestion, "MESSAGE") Command1.Enabled = True Command2.Enabled = False KOSONG pasif On Error GoTo 0 End With End If End Sub Private Sub Command5_Click() Unload Me Form7.Show End Sub Private Sub Command7_Click() PESAN = MsgBox("Do you want to close the Program?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then End

End If End Sub Private Sub Form_Load() For I = 1 To 12 Combo2.AddItem I Combo6.AddItem I Combo9.AddItem I Next I For J = 1 To 31 Combo1.AddItem J Combo5.AddItem J Combo8.AddItem J Next J For K = 1940 To 2010 Combo3.AddItem K Next K For L = 2000 To 2030 Combo7.AddItem L Combo10.AddItem L Next L Data1.DatabaseName = App.Path & ("\DATA.mdb") Data1.RecordSource = "PELANGGAN" Data1.EOFAction = 2 Data1.RecordsetType = 0 End Sub Private Sub mnBY_Click(Index As Integer) Unload Me Form2.Show End Sub Private Sub mnDC_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnE_Click(Index As Integer) Unload Me End Sub

Private Sub mnEDK_Click(Index As Integer) Unload Me Form5.Show End Sub Private Sub mnEPG_Click(Index As Integer) Unload Me Form9.Show End Sub Private Sub mnK_Click(Index As Integer) Unload Me Form10.Show End Sub Private Sub mnL_Click(Index As Integer) Unload Me Form6.Show End Sub Private Sub mnMN_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub mnPG_Click(Index As Integer) Unload Me Form4.Show End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If If KeyAscii = 13 Then

If Text1 = Empty Then PESAN = MsgBox("PLEASE WRITE KODE!", vbQuestion + vbOKCancel, "MESSAGE") Text1.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text1 If Not .NoMatch Then PESAN = MsgBox("ID " + Text1.Text + "sudah ada!", vbQuestion, "MESSAGE") Text1.Text = "" Text1.SetFocus Else Text2.SetFocus End If End With End If End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then Combo1.SetFocus End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text8.SetFocus End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text10.SetFocus End If End Sub Private Sub Timer1_Timer() Label1.Move Label1.Left - 35 If Label1.Left < -Label1.Width Then Label1.Left = Picture2.Width End If End Sub Private Sub Timer2_Timer() Label1.Move Label1.Left + 35 If Label1.Left > Picture2.Width Then Label1.Left = -Picture2.Width End If End Sub Private Sub Timer3_Timer() If Val(Text5) < Len(Label9) Then Text5 = "-1" Text5 = Val(Text5) + 1 Label9.Caption = Mid(Label3, 1, Val(Text5)) End Sub

FORM 2 (BIAYA) Sub KOSONG() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text7.Text = "" Text9.Text = "" Text4.Text = "" Text8.Text = "" Text10.Text = "" Text15.Text = "" Text16.Text = "" Combo4.Text = "" End Sub Sub aktif() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text15.Enabled = True Text16.Enabled = True Combo4.Enabled = True DTPicker1.Enabled = True DTPicker2.Enabled = True Command4.Enabled = True Command10.Enabled = True End Sub Sub pasif() Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False Text15.Enabled = False

Text16.Enabled = False Combo4.Enabled = False Command4.Enabled = False Command10.Enabled = False DTPicker1.Enabled = False DTPicker2.Enabled = False End Sub Private Sub Combo1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TAMBAH INAP End If End Sub Sub TAMBAH() If Combo1.Text = "VIP" Then Text13.Text = "100000" Text15.SetFocus Else If Combo1.Text = "KELAS 1" Then Text13.Text = "75000" Text15.SetFocus Else If Combo1.Text = "KELAS 2" Then Text13.Text = "50000" Text15.SetFocus Else If Combo1.Text = "KELAS 3" Then Text13.Text = "25000" Text15.SetFocus Else PESAN = MsgBox("The data is not registered in the kelas...!", vbQuestion, "MESSAGE") Combo1.SetFocus End If End If End If End If End Sub

Private Sub Combo2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo3.SetFocus End If End Sub Private Sub Combo3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Combo4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then DTPicker1.SetFocus End If End Sub Private Sub Combo5_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then DTPicker2.SetFocus End If End Sub Private Sub Combo6_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo7.SetFocus End If End Sub Private Sub Combo7_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text4.SetFocus End If

End Sub Private Sub Command1_Click() aktif Text1.SetFocus Command2.Enabled = True Command1.Enabled = False Command8.Enabled = False End Sub Private Sub Command10_Click() total End Sub Sub total() Text16.Text = Val(Text9.Text) * Val(Text15.Text) Command2.SetFocus End Sub Private Sub Command11_Click() TAMBAH INAP End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or _ Text4.Text = "" Or Text10.Text = "" Or _ Text8.Text = "" Or Text7.Text = "" Or _ Combo4.Text = "" Then PESAN = MsgBox("There are data which not yet loaded...!", vbQuestion, "MESSAGE") Text1.SetFocus Else With Data1.Recordset On Error Resume Next .Edit !ID = Text1.Text !NAMA = Text2.Text !TEMPAT = Text3.Text !ALAMAT = Text4.Text !Pekerjaan = Text8.Text

!TELP = Text10.Text !KELAMIN = Combo4.Text !MASUK = DTPicker1.Value !KELUAR = DTPicker2.Value !TANGGAL = Text7.Text !lama = Text9.Text !SEWA = Text15.Text !total = Text16.Text .Update PESAN = MsgBox("Data have saved", vbQuestion, "MESSAGE") Command6.Enabled = True Command8.Enabled = True Command2.Enabled = False KOSONG pasif On Error GoTo 0 End With End If End Sub Private Sub Command3_Click() PESAN = MsgBox("Do you want to delete..!", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then Data1.Recordset.Delete Data1.Refresh Command3.Enabled = False Command8.Enabled = False KOSONG End If End Sub Private Sub Command4_Click() Dim lama As Double A = DTPicker1.Value b = DTPicker2.Value lama = b - A Text9.Text = lama Text4.SetFocus End Sub Private Sub Command5_Click() Unload Me Form7.Show

End Sub Private Sub Command6_Click() pasif KOSONG Text11.Enabled = True Text11.SetFocus Text11.Text = "" Command9.Enabled = True Command8.Enabled = False Command3.Enabled = False Command1.Enabled = False End Sub Private Sub Command7_Click() PESAN = MsgBox("Do you want to close the Program ....?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then End End If End Sub Private Sub Command8_Click() PELANGGAN ='" & A & "' " DataReport1.Show Unload Me End Sub Private Sub Command9_Click() CARI End Sub Sub CARI() If Text11 = "" Then PESAN = MsgBox("Please write ID!!!", vbQuestion, "MESSAGE") Text11.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text11.Text If Not .NoMatch Then On Error Resume Next Text1.Text = !ID Text2.Text = !NAMA

Text3.Text = !TEMPAT Text4.Text = !ALAMAT DTPicker1.Value = !MASUK DTPicker2.Value = !KELUAR Text7.Text = !TANGGAL Text8.Text = !Pekerjaan Text10.Text = !TELP Combo4.Text = !KELAMIN Text9.Text = !lama Combo1.Text = !KELAS Text15.Text = !SEWA Text16.Text = !total pasif Text11.Enabled = False Command9.Enabled = False Command3.Enabled = True Command1.Enabled = True Command8.Enabled = True Command1.SetFocus On Error GoTo 0 Else PESAN = MsgBox("DATA NOT BE FOUND...", vbInformation, "ATTENTION") Text11.SetFocus Text11.Text = "" End If End With End If End Sub Private Sub DTPicker2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Dim lama As Double A = DTPicker1.Value b = DTPicker2.Value lama = b - A Text9.Text = lama Text4.SetFocus End If End Sub Private Sub Form_Load() For L = 2010 To 2030

Next L Data1.DatabaseName = App.Path & ("\DATA.mdb") Data1.RecordSource = "PELANGGAN" Data1.EOFAction = 2 Data1.RecordsetType = 0 End Sub Private Sub mnDK_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnE_Click(Index As Integer) Unload Me End Sub Private Sub mnEDK_Click(Index As Integer) Unload Me Form5.Show End Sub Private Sub mnEPG_Click(Index As Integer) Unload Me Form9.Show End Sub Private Sub mnK_Click(Index As Integer) Unload Me Form10.Show End Sub Private Sub mnL_Click(Index As Integer) Unload Me Form6.Show End Sub Private Sub mnMN_Click(Index As Integer)

Unload Me Form7.Show End Sub Private Sub mnP_Click(Index As Integer) Unload Me Form1.Show End Sub Private Sub mnPG_Click(Index As Integer) Unload Me Form4.Show End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text1 = Empty Then PESAN = MsgBox("PLEASE WRITE KODE", vbQuestion + vbOKCancel, "MESSAGE") Text1.SetFocus Else Text2.SetFocus End If End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text15.SetFocus End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CARI End If End Sub

Private Sub Text12_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command2.SetFocus End If End Sub Private Sub Text15_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then total End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text7.SetFocus End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text8.SetFocus End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

End If End Sub Sub INAP() Text5.Text = Val(Text9.Text) * Val(Text13.Text) End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text10.SetFocus End If End Sub Private Sub Timer1_Timer() If Val(Text5) < Len(Label9) Then Text5 = "-1" Text5 = Val(Text5) + 1 FORM 4 (DATA PEGAWAI) Sub KOSONG() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text10.Text = "" Text12.Text = "" Combo1.Text = "" Combo2.Text = "" Combo3.Text = "" Combo4.Text = "" Text5.Text = "" End Sub Sub aktif()

Label9.Caption = Mid(Label3, 1, Val(Text5)) End Sub Private Sub Timer2_Timer() Label1.Move Label1.Left + 35 If Label1.Left > Picture2.Width Then Label1.Left = -Picture2.Width End If End Sub Private Sub Timer3_Timer() On Error Resume Next If Command5.Visible = True Then Command5.Visible = False ElseIf Command5.Visible = False Then Command5.Visible = True End If End Sub Private Sub Timer4_Timer() Label1.Move Label1.Left - 35 If Label1.Left < -Label1.Width Then Label1.Left = Picture2.Width End If End Sub Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text10.Enabled = True Text12.Enabled = True Combo1.Enabled = True Combo2.Enabled = True Combo3.Enabled = True Combo4.Enabled = True End Sub Sub pasif() Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False

Text4.Enabled = False Text10.Enabled = False Text12.Enabled = False Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False End Sub Private Sub Combo1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo2.SetFocus End If End Sub Private Sub Combo2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo3.SetFocus End If End Sub Private Sub Combo3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Combo4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text4.SetFocus End If End Sub Private Sub Command1_Click() Combo1.Visible = True Combo2.Visible = True Combo3.Visible = True Text5.Visible = False

aktif KOSONG Text1.SetFocus Command2.Enabled = True Command1.Enabled = False Command4.Enabled = False Command3.Enabled = False End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or _ Text4.Text = "" Or _ Combo1.Text = "" Or Combo2.Text = "" Or Combo3.Text = "" Or _ Combo4.Text = "" Or Text10.Text = "" Or Text12.Text = "" Then PESAN = MsgBox("There are data which not yet loaded!", vbQuestion, "MESSAGE") Text1.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text1 If Not .NoMatch Then PESAN = MsgBox("ID " + Text1.Text + " have been filled!", vbQuestion, "MESSAGE") Text1.Text = "" Text1.SetFocus End If End With With Data1.Recordset On Error Resume Next .AddNew !ID = Text1.Text !NAMA = Text2.Text !TEMPAT = Text3.Text !ALAMAT = Text4.Text !TELP = Text10.Text !JABATAN = Text12.Text !KELAMIN = Combo4.Text !TANGGAL = Combo1 & "-" & Combo2 & "-" & Combo3

.Update Command1.Enabled = True Command4.Enabled = True Command2.Enabled = False Command3.Enabled = False KOSONG pasif On Error GoTo 0 End With End If End Sub Private Sub Command3_Click() PESAN = MsgBox("Do you want to delete?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then Data1.Recordset.Delete Data1.Refresh Command3.Enabled = False Command4.Enabled = False KOSONG End If End Sub Private Sub Command4_Click() LIHAT Combo1.Visible = False Combo2.Visible = False Combo3.Visible = False End Sub Sub LIHAT() If Text1 = "" Then PESAN = MsgBox("Please write ID!!!", vbQuestion, "MESSAGE") Text1.Enabled = True Text1.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text1.Text If Not .NoMatch Then On Error Resume Next Text2.Text = !NAMA Text3.Text = !TEMPAT Text4.Text = !ALAMAT

Text5.Text = !TANGGAL Text10.Text = !TELP Combo4.Text = !KELAMIN Text12.Text = !JABATAN pasif Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Command4.Enabled = False Command3.Enabled = True Command2.Enabled = True Command5.Enabled = True Command7.Enabled = True Command1.SetFocus On Error GoTo 0 Else PESAN = MsgBox("DATA NOT BE FOUND!", vbInformation, "ATTENTION") Text1.SetFocus Text1.Text = "" End If End With End If End Sub Private Sub Command5_Click() Unload Me Form7.Show End Sub Private Sub Command7_Click() PESAN = MsgBox("Do you want to close the Program?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then End End If End Sub Private Sub Form_Load() Command3.Enabled = False Combo1.Visible = False Combo2.Visible = False Combo3.Visible = False

Data1.DatabaseName = App.Path & ("\DATA.mdb") Data1.RecordSource = "PEGAWAI" Data1.EOFAction = 2 Data1.RecordsetType = 0 For I = 1 To 12 Combo2.AddItem I Next I For J = 1 To 31 Combo1.AddItem J Next J For K = 1940 To 2010 Combo3.AddItem K Next K End Sub Private Sub mnPG_Click(Index As Integer) End Sub Private Sub mnBY_Click(Index As Integer) Unload Me Form2.Show End Sub Private Sub mnDK_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnEDK_Click(Index As Integer) Unload Me Form5.Show End Sub Private Sub mnEPG_Click(Index As Integer) Unload Me Form9.Show End Sub Private Sub mnK_Click(Index As Integer)

Unload Me Form10.Show End Sub Private Sub mnL_Click(Index As Integer) Unload Me Form6.Show End Sub Private Sub mnP_Click(Index As Integer) Unload Me Form1.Show End Sub Private Sub mnU_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text1 = Empty Then PESAN = MsgBox("PLEASE WRITE KODE!", vbQuestion + vbOKCancel, "MESSAGE") Text1.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text1 If Not .NoMatch Then PESAN = MsgBox("ID " + Text1.Text + "sudah ada!", vbQuestion, "MESSAGE") Text1.Text = "" Text1.SetFocus Else Text2.SetFocus End If End With End If

End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text12.SetFocus End If End Sub Private Sub Text12_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo1.SetFocus End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then Text10.SetFocus End If End Sub Private Sub Timer1_Timer() On Error Resume Next If Command5.Visible = True Then Command5.Visible = False ElseIf Command5.Visible = False Then Command5.Visible = True End If End Sub Private Sub Timer2_Timer() Label1.Move Label1.Left - 35 If Label1.Left < -Label1.Width Then Label1.Left = Picture2.Width End If End Sub Private Sub Timer3_Timer() Label1.Move Label1.Left + 35 If Label1.Left > Picture2.Width Then Label1.Left = -Picture2.Width End If End Sub Private Sub Timer4_Timer() If Val(Text6) < Len(Label9) Then Text6 = "-1" Text6 = Val(Text6) + 1 Label9.Caption = Mid(Label3, 1, Val(Text6)) End Sub

FORM 5 (EDIT PELANGGAN) Sub KOSONG() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text10.Text = "" Text12.Text = "" Text5.Text = "" Combo4.Text = "" End Sub Sub aktif() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text10.Enabled = True Text12.Enabled = True Text5.Enabled = True Combo4.Enabled = True End Sub Sub pasif() Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text10.Enabled = False Text12.Enabled = False Text5.Enabled = False Combo4.Enabled = False End Sub Private Sub Combo4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text4.SetFocus End If End Sub Private Sub Command1_Click() aktif

Text1.SetFocus Command2.Enabled = True Command1.Enabled = False End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or _ Text4.Text = "" Or _ Text10.Text = "" Or Text5.Text = "" Or _ Combo4.Text = "" Or Text12.Text = "" Then PESAN = MsgBox("There are data which not yet loaded!", vbQuestion, "MESSAGE") Text1.SetFocus Else With Data1.Recordset On Error Resume Next .Edit !ID = Text1.Text !NAMA = Text2.Text !TEMPAT = Text3.Text !ALAMAT = Text4.Text !TELP = Text10.Text !Pekerjaan = Text12.Text !KELAMIN = Combo4.Text !TANGGAL = Text5.Text .Update PESAN = MsgBox("Data haved Saved", vbQuestion, "MESSAGE") Command1.Enabled = True Command6.Enabled = True Command2.Enabled = False KOSONG pasif On Error GoTo 0 End With End If End Sub Private Sub Command3_Click()

PESAN = MsgBox("Do you want to delete?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then Data1.Recordset.Delete Data1.Refresh Command3.Enabled = False KOSONG End If End Sub Private Sub Command5_Click() Unload Me Form7.Show End Sub Private Sub Command6_Click() pasif KOSONG Text11.Enabled = True Text11.SetFocus Text11.Text = "" Command9.Enabled = True Command3.Enabled = False Command1.Enabled = False End Sub Private Sub Command7_Click() PESAN = MsgBox("Do you want to close the Program?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then End End If End Sub Private Sub Command9_Click() CARI End Sub Sub CARI() If Text11 = "" Then PESAN = MsgBox("Please write ID!!!", vbQuestion, "MESSAGE") Text11.SetFocus Else

With Data1.Recordset .Index = "IDDEX" .Seek "=", Text11.Text If Not .NoMatch Then On Error Resume Next Text1.Text = !ID Text2.Text = !NAMA Text3.Text = !TEMPAT Text4.Text = !ALAMAT Text5.Text = !TANGGAL Text10.Text = !TELP Combo4.Text = !KELAMIN Text12.Text = !Pekerjaan pasif Text11.Enabled = False Command9.Enabled = False Command10.Enabled = True Command3.Enabled = True Command1.Enabled = True Command6.SetFocus On Error GoTo 0 Else PESAN = MsgBox("DATA NOT BE FOUND!", vbInformation, "ATTENTION") Text11.SetFocus Text11.Text = "" End If End With End If End Sub Private Sub Form_Activate() Text11.SetFocus End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path & ("\DATA.mdb") Data1.RecordSource = "PELANGGAN" Data1.EOFAction = 2 Data1.RecordsetType = 0 End Sub

Private Sub mnL_Click(Index As Integer) Unload Me Form6.Show End Sub Private Sub mnU_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub mnDK_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnEB_Click(Index As Integer) Unload Me Form2.Show End Sub Private Sub mnEPG_Click() Unload Me Form9.Show End Sub Private Sub mnK_Click(Index As Integer) Unload Me Form10.Show End Sub Private Sub mnLG_Click(Index As Integer) Unload Me Form6.Show End Sub Private Sub mnP_Click(Index As Integer) Unload Me Form1.Show End Sub

Private Sub mnPG_Click(Index As Integer) Unload Me Form4.Show End Sub Private Sub mnUT_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text1 = Empty Then PESAN = MsgBox("PLEASE WRITE KODE", vbQuestion + vbOKCancel, "MESSAGE") Text1.SetFocus Else Text2.SetFocus End If End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text12.SetFocus End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CARI End If End Sub Private Sub Text12_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then Command2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text5.SetFocus End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text10.SetFocus End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Timer1_Timer() On Error Resume Next If Command5.Visible = True Then Command5.Visible = False ElseIf Command5.Visible = False Then

Command5.Visible = True End If End Sub Private Sub Timer2_Timer() Label1.Move Label1.Left - 35 If Label1.Left < -Label1.Width Then Label1.Left = Picture1.Width End If End Sub Private Sub Timer3_Timer() Label1.Move Label1.Left + 35 If Label1.Left > Picture1.Width Then Label1.Left = -Picture1.Width End If End Sub Private Sub Timer4_Timer() Label3.Move Label3.Left - 35 If Label3.Left < -Label3.Width Then Label3.Left = Picture1.Width End If End Sub Private Sub Timer5_Timer() Label3.Move Label3.Left + 35 If Label3.Left > Picture1.Width Then Label3.Left = -Picture1.Width End If End Sub Private Sub Timer6_Timer() If Val(Text6) < Len(Label9) Then Text6 = "-1" Text6 = Val(Text6) + 1 Label9.Caption = Mid(Label2, 1, Val(Text6)) End Sub

FORM 6 (PASSWORD) Private Sub CDAFTAR_Click() CARI End Sub Private Sub Command2_Click() Form8.Show Unload Me End Sub Private Sub Command3_Click() PESAN = MsgBox("Yakin Ingin Keluar NICH ....?", vbInformation + vbYesNo, "ATTENTION") If PESAN = vbYes Then Unload Me End If End Sub Private Sub Form_Load() KOSONGKAN TLOGIN.Text = "" TPAS.Text = "" Data1.DatabaseName = App.Path & "\DATA.mdb" Data1.RecordSource = "PASSWORD" Data1.EOFAction = 2 Data1.RecordsetType = 0 End Sub Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single) KOSONGKAN End Sub Private Sub Image1_Click(Index As Integer) KOSONGKAN End Sub Private Sub Image2_Click(Index As Integer)

End Sub Private Sub Timer1_Timer() On Error Resume Next If Frame2.Visible = True Then Frame2.Visible = False ElseIf Frame2.Visible = False Then Frame2.Visible = True End If End Sub Private Sub TLOGIN_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then TPAS.SetFocus End If End Sub Private Sub TPAS_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then CARI End If 'membatasi keyboard If Not (KeyAscii = vbKeyBack Or _ KeyAscii >= Asc("0") And _ KeyAscii <= Asc("9") Or _ KeyAscii = 13) Then KeyAscii = 0 End If End Sub Sub CARI() If TLOGIN = Empty Then PESAN = MsgBox("SILAHKAN MASUKKAN USERNAME DAN PASSWORD DULU", vbQuestion, "MESSAGE") TLOGIN.SetFocus Else With Data1.Recordset .Index = "USSERDEX"

.Seek "=", TLOGIN If Not .NoMatch Then If !Password = TPAS Then Form7.Show Unload Me KOSONGKAN Else PESAN = MsgBox("^MAAF,PASSWORD YANG ANDA MASUKKAN SALAH^", vbOKOnly, "ATTENTION") End If FORM 7 (MENU UTAMA) Private Sub cmddata_Click() Unload Me Form1.Show End Sub Private Sub cmdlogoff_Click() End End Sub Private Sub CMDmenu_Click() Frame4.Visible = True End Sub Private Sub Command1_Click() Unload Me Form10.Show End Sub Private Sub Command2_Click() Unload Me Form4.Show End Sub Private Sub Command3_Click() Unload Me Form6.Show End Sub Private Sub Command4_Click() Frame4.Visible = False Frame3.Visible = True

Else PESAN = MsgBox("-)USERNAME ANDA BELUM TERDAFTAR-(") TLOGIN.SetFocus End If End With End If End Sub Sub KOSONGKAN() TLOGIN.Text = "" TPAS.Text = "" End Sub End Sub Private Sub Command5_Click() Unload Me Form2.Show End Sub Private Sub Command6_Click() Unload Me Form5.Show End Sub Private Sub Command7_Click() Unload Me Form9.Show End Sub Private Sub Command8_Click() Unload Me End Sub Private Sub Form_Click() Frame4.Visible = False Frame3.Visible = False End Sub Private Sub Timer1_Timer() On Error Resume Next If CMDmenu.Visible = True Then CMDmenu.Visible = False

ElseIf CMDmenu.Visible = False Then CMDmenu.Visible = True End If End Sub Private Sub Timer3_Timer() FORM 8 (UBAH) Private Sub CDAFTAR_Click() Label4.Visible = True Label7.Visible = True Label9.Visible = False Label10.Visible = False Label8.Visible = False Label3.Caption = "" Label5.Caption = "" Label6.Caption = "" Text1.Enabled = False Text1.Text = "" Text3.Enabled = False Text3.Text = "" TUBAH1.Enabled = False TUBAH1.Text = "" TUBAH2.Enabled = False TUBAH2.Text = "" TNAMA.Enabled = True TPAS2.Enabled = True CUPDATE.Enabled = True TNAMA.SetFocus TNAMA.Text = "" TPAS2.Text = "" End Sub Private Sub CHAPUS_Click() If Text1.Text = "" Or Text2.Text = "" Then PESAN = MsgBox("NOTHING DELETED DATA ", vbInformation, "ATTENTION") Else PESAN2 = MsgBox("Do you want to delete..!", vbInformation + vbYesNo, "ATTENTION") If PESAN2 = vbYes Then

If Val(Text1) < Len(Label1) Then Text1 = "-1" Text1 = Val(Text1) + 1 Label1.Caption = Mid(Label3, 1, Val(Text1)) End Sub

Data1.Recordset.Delete Text1.Text = "" Text2.Text = "" Label3.Caption = "" Text1.Enabled = False End If End If End Sub Private Sub CKELUAR_Click() PESAN = MsgBox("Do you want to close the Program ....?", vbInformation + vbYesNo, "ATTENTION") If PESAN = vbYes Then Unload Me End If End Sub Private Sub Command1_Click() Form6.Show Unload Me End Sub Private Sub Command2_Click() Label4.Visible = False Label7.Visible = False Label9.Visible = False Label10.Visible = False Label8.Visible = False Label3.Caption = "Please Write Your Ussername " Label1.Caption = "" Label2.Caption = "" Label5.Caption = "" Label6.Caption = "" TNAMA.Enabled = False

TNAMA.Text = "" TPAS2.Enabled = False TPAS2.Text = "" TUBAH1.Enabled = False TUBAH1.Text = "" TUBAH2.Enabled = False TUBAH2.Text = "" Text3.Enabled = False Text3.Text = "" Text1.Enabled = True Text1.SetFocus End Sub Private Sub Command3_Click() CARI End Sub Sub CARI() If Text1 = "" Then PESAN = MsgBox("Please Input Ussername!", vbQuestion, "MESSAGE") Text1.SetFocus Else With Data1.Recordset .Index = "USSERDEX" .Seek "=", Text1.Text If Not .NoMatch Then Text1.Text = !USSER Text2.Text = !Password Else PESAN = MsgBox("USSER NAME " + Text1.Text + " NOT YET REGISTER.", vbInformation, "ATTENTION") Text1.SetFocus Data1.Refresh End If End With End If End Sub Private Sub Command4_Click() Label4.Caption = "ULANGI" TPAS2.SetFocus End Sub

Private Sub Command5_Click() Label9.Visible = True Label10.Visible = True If Text3.Text = "" Then PESAN = MsgBox("PLEASE INPUT FORMER USSER NAME..", vbInformation, "MESSAGE") Text3.Enabled = True Text3.Text = "" Text3.SetFocus Else With Data1.Recordset .Index = "USSERDEX" .Seek "=", Text3.Text If Not .NoMatch Then TUBAH1.Text = !USSER TUBAH2.Text = !Password Label6.Caption = "PLEASE CHANGE PASSWORD / YOUR USSER NAME" TUBAH1.Enabled = True TUBAH2.Enabled = True TUBAH1.SetFocus Else PESAN = MsgBox("USSER NAME " + Text3.Text + " NOT YET REGISTER. PLEASE REGISTER NOW ....", vbInformation, "ATTENTION") Text3.SetFocus Data1.Refresh End If End With End If End Sub Private Sub Command6_Click() If TUBAH1.Text = "" Or TUBAH2.Text = "" Then PESAN = MsgBox("THERE ARE DATA WHICH NOT YET LOADED...!!", vbInformation, "ATTENTION.") Else With Data1.Recordset .Edit

!USSER = TUBAH1.Text !Password = TUBAH2.Text .Update TUBAH1.Text = "" TUBAH2.Text = "" Text3.Text = "" Label6.Caption = "" Label5.Caption = "" TUBAH1.Enabled = False TUBAH2.Enabled = False Text3.Enabled = False Command6.Enabled = False CUBAH.SetFocus End With Data1.Refresh End If End Sub Private Sub CUBAH_Click() Label4.Visible = False Label7.Visible = False Label9.Visible = False Label10.Visible = False Label8.Visible = True Label5.Caption = "FORMER SEARCHING DATA AND INPUT of USSER NAME" Label1.Caption = "" Label2.Caption = "" Label3.Caption = "" Text3.Text = "" Text1.Enabled = False Text1.Text = "" TNAMA.Enabled = False TNAMA.Text = "" TPAS2.Enabled = False TPAS2.Text = "" Text3.Enabled = True Command6.Enabled = True Text3.SetFocus End Sub Private Sub CUPDATE_Click() If TNAMA.Text = "" Or TPAS2.Text = "" Then

PESAN = MsgBox("THERE ARE DATA WHICH NOT YET LOADED...", vbInformation, "ATTENTION") Else With Data1.Recordset .Index = "USSERDEX" .Seek "=", TNAMA If Not .NoMatch Then PESAN = MsgBox("ID " + TNAMA.Text + " have been filled..! PLEASE TRY ONCE AGAIN", vbQuestion, "MESSAGE") TNAMA.Text = "" TNAMA.SetFocus End If End With With Data1.Recordset 'On Error Resume Next .AddNew !USSER = TNAMA.Text !Password = TPAS2.Text .Update 'On Error GoTo 0 TNAMA.Text = "" TPAS2.Text = "" Label1.Caption = "" Label2.Caption = "" TNAMA.Enabled = False TPAS2.Enabled = False CUPDATE.Enabled = False End With 'Data1.Refresh End If End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path & "\DATA.mdb" Data1.RecordSource = "PASSWORD" Data1.EOFAction = 2 Data1.RecordsetType = 0 TNAMA.Enabled = False TPAS2.Enabled = False Text1.Enabled = False

Text2.Enabled = False Text3.Enabled = False TUBAH1.Enabled = False TUBAH2.Enabled = False End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text1.Text = "" Then PESAN = MsgBox("PLEASE INPUT USSER NAME..", vbInformation, "MESSAGE") Text1.Text = "" Text1.SetFocus Else With Data1.Recordset .Index = "USSERDEX" .Seek "=", Text1.Text If Not .NoMatch Then Text1.Text = !USSER Text2.Text = !Password CHAPUS.SetFocus Else PESAN = MsgBox("USSER NAME " + Text1.Text + " NOT YET REGISTER. PLEASE REGISTER NOW ....", vbInformation, "ATTENTION") Text1.SetFocus Text1.Text = "" Data1.Refresh End If End With End If End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text3.Text = "" Then

PESAN = MsgBox("PLEASE INPUT USSER NAME..", vbInformation, "MESSAGE") Text3.Text = "" Text3.SetFocus Else With Data1.Recordset .Index = "USSERDEX" .Seek "=", Text3.Text If Not .NoMatch Then TUBAH1.Text = !USSER TUBAH2.Text = !Password Label6.Caption = "PLEASE CHANGE PASSWORD / YOUR USSER NAME" TUBAH1.Enabled = True TUBAH2.Enabled = True TUBAH1.SetFocus Else PESAN = MsgBox("USSER NAME " + Text3.Text + " NOT YET REGISTER. PLEASE REGISTER NOW ....", vbInformation, "ATTENTION") Text3.SetFocus Data1.Refresh End If End With End If End If End Sub Private Sub Timer1_Timer() On Error Resume Next If Command2.Visible = True Then Command2.Visible = False ElseIf Command2.Visible = False Then Command2.Visible = True End If End Sub Private Sub TNAMA_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

If TNAMA.Text = "" Then PESAN = MsgBox("PLEASE INPUT USSER NAME..", vbInformation, "MESSAGE") TNAMA.Text = "" TNAMA.SetFocus Else TPAS2.SetFocus End If End If End Sub Private Sub TPAS1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Label4.Caption = "ULANGI" TPAS2.SetFocus End If End Sub Private Sub TPAS2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CUPDATE.SetFocus End If FORM 9 (EDIT PEGAWAI) Sub KOSONG() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text10.Text = "" Text12.Text = "" Text5.Text = "" Combo4.Text = "" End Sub Sub aktif() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True

End Sub Private Sub TUBAH1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If TUBAH1.Text = "" Then PESAN = MsgBox("PLEASE INPUT USSER NAME..", vbInformation, "MESSAGE") TUBAH1.Text = "" TUBAH1.SetFocus Else TUBAH2.SetFocus End If End If End Sub Private Sub TUBAH2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command6.SetFocus End If End Sub

Text10.Enabled = True Text12.Enabled = True Text5.Enabled = True Combo4.Enabled = True End Sub Sub pasif() Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text10.Enabled = False Text12.Enabled = False Text5.Enabled = False Combo4.Enabled = False End Sub

Private Sub Combo4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text4.SetFocus End If End Sub Private Sub Command1_Click() aktif Text1.SetFocus Command2.Enabled = True Command1.Enabled = False Command3.Enabled = False End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or _ Text4.Text = "" Or Text5.Text = "" Or _ Combo4.Text = "" Or Text10.Text = "" Or Text12.Text = "" Then PESAN = MsgBox("There are data which not yet loaded!", vbQuestion, "MASSAGE") Text1.SetFocus Else With Data1.Recordset On Error Resume Next .Edit !ID = Text1.Text !NAMA = Text2.Text !TEMPAT = Text3.Text !ALAMAT = Text4.Text !TELP = Text10.Text !JABATAN = Text12.Text !KELAMIN = Combo4.Text !TANGGAL = Combo1 & "-" & Combo2 & "-" & Combo3 .Update Command1.Enabled = True Command6.Enabled = True Command3.Enabled = True Command2.Enabled = False KOSONG

pasif On Error GoTo 0 End With End If End Sub Private Sub Command3_Click() PESAN = MsgBox("Do you want to delete?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then Data1.Recordset.Delete 'Data1.Refresh Command3.Enabled = False KOSONG End If End Sub Private Sub Command5_Click() Unload Me Form7.Show End Sub Private Sub Command6_Click() pasif KOSONG Text11.Enabled = True Text11.SetFocus Text11.Text = "" Command9.Enabled = True Command3.Enabled = False Command1.Enabled = False End Sub Private Sub Command7_Click() PESAN = MsgBox("Do you want to close the Program?", vbQuestion + vbYesNo, "MESSAGE") If PESAN = vbYes Then End End If End Sub Private Sub Command9_Click() CARI End Sub

Sub CARI() If Text11 = "" Then PESAN = MsgBox("Please write ID!!!", vbQuestion, "MESSAGE") Text11.SetFocus Else With Data1.Recordset .Index = "IDDEX" .Seek "=", Text11.Text If Not .NoMatch Then On Error Resume Next Text1.Text = !ID Text2.Text = !NAMA Text3.Text = !TEMPAT Text4.Text = !ALAMAT Text5.Text = !TANGGAL Text10.Text = !TELP Combo4.Text = !KELAMIN Text12.Text = !JABATAN pasif Text11.Enabled = False Command9.Enabled = False Command3.Enabled = True Command1.Enabled = True Command4.Enabled = True Command6.SetFocus On Error GoTo 0 Else PESAN = MsgBox("DATA NOT BE FOUND!", vbInformation, "ATTENTION") Text11.SetFocus Text11.Text = "" End If End With End If End Sub Private Sub Form_Activate() Text11.SetFocus End Sub Private Sub Form_Load()

Data1.DatabaseName = App.Path & ("\DATA.mdb") Data1.RecordSource = "PEGAWAI" Data1.EOFAction = 2 Data1.RecordsetType = 0 End Sub Private Sub mnEB_Click(Index As Integer) Unload Me Form2.Show End Sub Private Sub mnEDK_Click(Index As Integer) Unload Me Form5.Show End Sub Private Sub mnK_Click(Index As Integer) Unload Me Form10.Show End Sub Private Sub mnP_Click(Index As Integer) Unload Me Form1.Show End Sub Private Sub mnPG_Click(Index As Integer) Unload Me Form4.Show End Sub Private Sub mnDK_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnL_Click(Index As Integer) Unload Me Form6.Show

End Sub Private Sub mnU_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub mnUT_Click(Index As Integer) Unload Me Form7.Show End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Text1 = Empty Then PESAN = MsgBox("PLEASE WRITE KODE!", vbQuestion + vbOKCancel, "MESSAGE") Text1.SetFocus Else Text2.SetFocus End If End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text12.SetFocus End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CARI End If End Sub

Private Sub Text12_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text5.SetFocus End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text10.SetFocus End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo4.SetFocus End If End Sub Private Sub Timer1_Timer() On Error Resume Next If Command5.Visible = True Then Command5.Visible = False ElseIf Command5.Visible = False Then Command5.Visible = True End If

End Sub Private Sub Timer2_Timer() Label1.Move Label1.Left - 35 If Label1.Left < -Label1.Width Then Label1.Left = Picture2.Width End If End Sub Private Sub Timer3_Timer() Label1.Move Label1.Left + 35 If Label1.Left > Picture2.Width Then Label1.Left = -Picture2.Width End If End Sub Private Sub Timer4_Timer() Label2.Move Label2.Left - 35 If Label2.Left < -Label2.Width Then FORM 10 (KELOMPOK) Dim teks As String Private Sub Form_Load() teks = Form10.Caption End Sub Private Sub Label18_Click() End Sub Private Sub Label22_Click() End Sub Private Sub Timer1_Timer() On Error Resume Next If Label1.Visible = True Then Label1.Visible = False ElseIf Label1.Visible = False Then Label1.Visible = True End If End Sub Private Sub mnBY_Click(Index As Integer)

Label2.Left = Picture2.Width End If End Sub Private Sub Timer5_Timer() Label2.Move Label2.Left + 35 If Label2.Left > Picture2.Width Then Label2.Left = -Picture2.Width End If End Sub Private Sub Timer6_Timer() If Val(Text6) < Len(Label9) Then Text6 = "-1" Text6 = Val(Text6) + 1 Label9.Caption = Mid(Label3, 1, Val(Text6)) End Sub

Unload Me Form2.Show End Sub Private Sub mnDK_Click(Index As Integer) Unload Me Form3.Show End Sub Private Sub mnEDK_Click(Index As Integer) Unload Me Form5.Show End Sub Private Sub mnEPG_Click(Index As Integer) Unload Me Form9.Show End Sub Private Sub mnL_Click(Index As Integer)

Unload Me Form6.Show End Sub Private Sub mnP_Click(Index As Integer) Unload Me Form1.Show End Sub Private Sub mnPG_Click(Index As Integer) Unload Me Form4.Show

End Sub Private Sub mnUT_Click() Unload Me Form7.Show End Sub Private Sub mnX_Click(Index As Integer) Unload Me End Sub Private Sub Timer30_Timer() End Sub

Anda mungkin juga menyukai