Sistem Informasi Persewaan Mobil

download Sistem Informasi Persewaan Mobil

of 44

Transcript of Sistem Informasi Persewaan Mobil

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    1/44

    TUGAS KELOMPOK

    APLIKASI DATABASE

    PADA SISTEM INFORMASI PERSEWAAN MOBIL

    PLAMONGAN RENTCAR

    Mata Kuliah : Data Base

    Dosen Pengampu : Much. Aziz Muslim, S.Kom, M.Kom

    Disusun oleh:

    1. Nadia Pradyta N. I (4101406570)

    2. Lisa Noorwahyuni (4101406578)

    3. Wahyu Hartanti H (4101406580)

    4. Ika Nur Izzah (4101406589)

    5. Neti Sarofa (4101406592)

    JURUSAN MATEMATIKA

    FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM

    UNIVERSITAS NEGERI SEMARANG

    2010

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    2/44

    BAB I

    PENDAHULUAN

    A. Latar Belakang

    Teknologi informasi merupakan salah satu teknologi yang sedang ber-

    kembang dengan pesat pada saat ini. Dengan kemajuan teknologi informasi,

    pengaksesan terhadap data atau informasi yang tersedia dapat berlangsung-

    dengan cepat, efisien serta akurat. Contoh dari hasil kemajuan teknologi infor-

    masi 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 peme-

    rintah 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 mengim-

    plementasikan 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. Bagaimana bentuk basis data sistem informasi persewaan mobil ?

    2. Bagaimana program Microsoft Visual Basic dan Microsoft Acces

    pada sistem informasi persewaan mobil?

    3. Bagaimana output sistem informasi persewaan mobil?

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    3/44

    C. Tujuan dan Manfaat

    Tujuan dan Manfaat dari makalah ini antara lain adalah:

    1. Untuk mengetahui bentuk basis data sistem informasi persewaan

    mobil.

    2. Untuk mengetahui program Microsoft Visual Basic dan Microsoft

    Acces pada sistem informasi persewaan mobil.

    3. Untuk mengetahui output sistem informasi persewaan mobil.

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    4/44

    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 sali-

    ng 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 tekno-

    logi 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 di-

    manfaatkan 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 memanfaat-kan fasilitas yang tersedia dalamMicrosoft 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 :

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    5/44

    1. Data pelanggan

    Berfungsi untuk mengetahui pelanggan pinjam tanggal berapa, tang-

    gal pengembalian berapa, lama sewa, biaya peminjaman dan untuk me-

    ngetahui 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

    dengan Microsoft Visual Basic 6.0.

    Tampilan Form Menu Login

    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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    6/44

    Pada command login ini difungsikan untuk:

    1) Jika pada LOGIN diklik maka akan muncul pesan seperti di ba-

    wah ini:

    2) Apabila pengguna belum mengetahui username untuk program

    ini,dan pengguna menulis sembarang maka akan muncul peri-

    ngatan 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 di-

    bawah 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.

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    7/44

    Tampilan Form Menu Ubah

    Tampilan Form Menu Utama

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    8/44

    Tampilan Form Input Data Pegawai

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    9/44

    Tampilan Form Input Data Pelanggan

    Tampilan Form Input Biaya

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    10/44

    Tampilan Form Edit Pegawai

    Tampilan Form Edit Data Pelanggan

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    11/44

    Tampilan form Programmer

    Form Data Report

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    12/44

    BAB III

    PENUTUP

    A. Simpulan

    Dengan melihat permasalahan dan pembahasan maka kita dapat men-

    yimpulkan 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.

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    13/44

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    14/44

    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 = TrueCombo7.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 = FalseCombo1.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("0") And _

    KeyAscii

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    15/44

    If Not (KeyAscii = vbKeyBack Or _

    KeyAscii >= Asc("0") And _

    KeyAscii = Asc("0") And _

    KeyAscii = Asc("0") And _

    KeyAscii = Asc("0") And _

    KeyAscii = Asc("0") And _

    KeyAscii = Asc("0") And _KeyAscii

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    16/44

    Private Sub

    Combo9_KeyPress(KeyAscii As

    Integer)If Not (KeyAscii = vbKeyBack Or _

    KeyAscii >= Asc("0") And _

    KeyAscii

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    17/44

    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 JFor 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 MeForm5.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    18/44

    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 ThenText3.SetFocus

    End If

    End Sub

    Private Sub

    Text3_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

    Combo1.SetFocus

    End IfEnd Sub

    Private Sub

    Text4_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

    Text8.SetFocus

    End If

    End Sub

    Private SubText8_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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    19/44

    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 = FalseCombo4.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 ThenTAMBAH

    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

    ElsePESAN = MsgBox("The data is not

    registered in the kelas...!",

    vbQuestion, "MESSAGE")

    Combo1.SetFocus

    End If

    End If

    End If

    End If

    End Sub

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    20/44

    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 IfEnd 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    21/44

    !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 = FalseKOSONG

    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 = "" ThenPESAN = 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    22/44

    Text3.Text = !TEMPAT

    Text4.Text = !ALAMAT

    DTPicker1.Value = !MASUKDTPicker2.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 = FalseCommand9.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 ThenDim 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 MeForm10.Show

    End Sub

    Private Sub mnL_Click(Index As

    Integer)

    Unload Me

    Form6.Show

    End Sub

    Private Sub mnMN_Click(Index As

    Integer)

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    23/44

    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.ShowEnd 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 ThenText15.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 AsInteger)

    If KeyAscii = 13 Then

    Command2.SetFocus

    End If

    End Sub

    Private Sub

    Text15_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

    totalEnd 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 AsInteger)

    If KeyAscii = 13 Then

    Text8.SetFocus

    End If

    End Sub

    Private Sub

    Text5_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    24/44

    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 IfEnd 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

    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 NextIf 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

    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()

    Text1.Enabled = True

    Text2.Enabled = True

    Text3.Enabled = True

    Text4.Enabled = True

    Text10.Enabled = TrueText12.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    25/44

    Text4.Enabled = False

    Text10.Enabled = False

    Text12.Enabled = FalseCombo1.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.SetFocusEnd 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 AsInteger)

    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.SetFocusCommand2.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 = "" OrCombo2.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.RecordsetOn 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    26/44

    .Update

    Command1.Enabled = True

    Command4.Enabled = TrueCommand2.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 todelete?", 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 = !KELAMINText12.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.SetFocusOn 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    27/44

    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 KEnd 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 MeForm5.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.ShowEnd 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 "=", Text1If 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    28/44

    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 IfEnd 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    29/44

    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.SetFocusCommand2.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 = TrueCommand6.Enabled = True

    Command2.Enabled = False

    KOSONG

    pasif

    On Error GoTo 0

    End With

    End If

    End Sub

    Private Sub Command3_Click()

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    30/44

    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.ShowEnd 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.TextIf 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

    pasifText11.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    31/44

    Private Sub mnL_Click(Index As

    Integer)

    Unload MeForm6.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 AsInteger)

    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)

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    32/44

    If KeyAscii = 13 Then

    Command2.SetFocus

    End IfEnd Sub

    Private Sub

    Text2_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

    Text3.SetFocus

    End If

    End Sub

    Private SubText3_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 IfEnd 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.WidthThen

    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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    33/44

    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 SubFrame1_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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    34/44

    .Seek "=", TLOGIN

    If Not .NoMatch Then

    If !Password = TPAS ThenForm7.Show

    Unload Me

    KOSONGKAN

    Else

    PESAN =

    MsgBox("^MAAF,PASSWORD

    YANG ANDA MASUKKAN

    SALAH^", vbOKOnly,

    "ATTENTION")

    End If

    Else

    PESAN =

    MsgBox("-)USERNAME ANDABELUM TERDAFTAR-(")

    TLOGIN.SetFocus

    End If

    End With

    End If

    End Sub

    Sub KOSONGKAN()

    TLOGIN.Text = ""

    TPAS.Text = ""

    End Sub

    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

    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 MeEnd 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    35/44

    ElseIf CMDmenu.Visible = False

    Then

    CMDmenu.Visible = TrueEnd If

    End Sub

    Private Sub Timer3_Timer()

    If Val(Text1) < Len(Label1) Then

    Text1 = "-1"

    Text1 = Val(Text1) + 1Label1.Caption = Mid(Label3, 1,

    Val(Text1))

    End Sub

    FORM 8 (UBAH)

    Private Sub CDAFTAR_Click()

    Label4.Visible = True

    Label7.Visible = True

    Label9.Visible = FalseLabel10.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

    Data1.Recordset.Delete

    Text1.Text = ""

    Text2.Text = ""

    Label3.Caption = ""

    Text1.Enabled = FalseEnd 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 = FalseLabel7.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    36/44

    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 = TrueIf 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.TextIf 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    37/44

    !USSER = TUBAH1.Text

    !Password = TUBAH2.Text

    .UpdateTUBAH1.Text = ""

    TUBAH2.Text = ""

    Text3.Text = ""

    Label6.Caption = ""

    Label5.Caption = ""

    TUBAH1.Enabled = False

    TUBAH2.Enabled = False

    Text3.Enabled = False

    Command6.Enabled = False

    CUBAH.SetFocus

    End WithData1.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    38/44

    Text2.Enabled = False

    Text3.Enabled = False

    TUBAH1.Enabled = FalseTUBAH2.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 WithEnd 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 / YOURUSSER 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 ThenCommand2.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    39/44

    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 AsInteger)

    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

    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

    ElseTUBAH2.SetFocus

    End If

    End If

    End Sub

    Private Sub

    TUBAH2_KeyPress(KeyAscii As

    Integer)

    If KeyAscii = 13 Then

    Command6.SetFocus

    End If

    End Sub

    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

    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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    40/44

    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 = FalseEnd 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 WithEnd 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 = FalseKOSONG

    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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    41/44

    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 = !IDText2.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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    42/44

    End Sub

    Private Sub mnU_Click(Index AsInteger)

    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 IfEnd 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 IfEnd 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.SetFocusEnd 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

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    43/44

    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.WidthEnd If

    End Sub

    Private Sub Timer4_Timer()

    Label2.Move Label2.Left - 35

    If Label2.Left < -Label2.Width Then

    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) ThenText6 = "-1"

    Text6 = Val(Text6) + 1

    Label9.Caption = Mid(Label3, 1,

    Val(Text6))

    End Sub

    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)

    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 MeForm5.Show

    End Sub

    Private Sub mnEPG_Click(Index As

    Integer)

    Unload Me

    Form9.Show

    End Sub

    Private Sub mnL_Click(Index As

    Integer)

  • 7/29/2019 Sistem Informasi Persewaan Mobil

    44/44

    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