P. 1
Program Perpustakaan

Program Perpustakaan

|Views: 71|Likes:
Dipublikasikan oleh Melon Wahyu Sembodo

More info:

Published by: Melon Wahyu Sembodo on Dec 18, 2011
Hak Cipta:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/16/2012

pdf

text

original

www.konsultasivb.

com
Harga program Rp.50.000. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an. Uus Rusmawan Email : uusrusmawan@yahoo.com

PROGRAM PERPUSTAKAAN (FULL SOURCE CODE)
Normalisasi File

Form login

Form anggota

1

com Form buku Transaksi Peminjaman Buku 2 . Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.000.50.www.konsultasivb.com Harga program Rp. Uus Rusmawan Email : uusrusmawan@yahoo.

com Coding : Private Sub Form_Activate() 'hubungkan objek adodc ke database DT.Refresh 'panggil file database Call BukaDB 'buka tabel buku dan tampilkan kode dan judlnya di list sebelah kanan RSBuku.4.DataSource = DT 'grid di-refresh DG1.Open "Select * from anggota where nomoragt='" & TxtNomorAgt & "'".AddItem RSBuku!Judul & Space(50) & RSBuku!NomorBk RSBuku.Clear Do Until RSBuku. Conn 'jika ditemukan If Not RSAnggota.Col = 1 Else 'jika tidak ditemukan.Caption = RSAnggota!Namaagt DG1.Jet.Path & "\ADOPustaka.000.Col = 1 End Sub Private Sub TxtNomorAgt_KeyPress(Keyascii As Integer) TxtNomorAgt.50. Uus Rusmawan Email : uusrusmawan@yahoo. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.Data Source= " & App. munculkan pesan MsgBox "Nomor anggota tidak terdaftar" 3 .SetFocus DG1.konsultasivb.Caption = Date Call Tabel_Kosong DT.ConnectionString = "Provider=Microsoft.mdb" 'hubungkan objek adodc ke tabel DT.MoveNext Loop 'tampilkan nomor pinjam otomatis Call AutoNomor LblTanggal.RecordSource = "Transaksi" 'sumber data untuk grid1 adalah data dalam objek Set DG1.MaxLength = 4 Keyascii = Asc(UCase(Chr(Keyascii))) If Keyascii = 27 Then Unload Me If Keyascii = 13 Then Call BukaDB 'cari nomor anggota yang diketik RSAnggota.EOF Then 'tampilkan namanya LblNamaAgt.0.www. Conn List1.Open "Buku".OLEDB.com Harga program Rp.Recordset.EOF List1.MoveFirst DG1.

SetFocus End Sub Private Sub cmdtutup_Click() Unload Me End Sub Function Tambah_Baris() For i = DT.Recordset. 4) Then DG1.konsultasivb.SetFocus Exit Sub End If End If End Sub Private Sub cmdSimpan_Click() 'jika total pinjaman belum ada.Recordset.Recordset. tampilkan pesan If LblTotalPjm.Recordset.Recordset!Kode = Null DT.www.SelText <> Right(List1.Update Next i End Function 'jika menekan ESC dalam grid transaksi 'data akan hilang (dibatalkan) dan baris berkurang Private Sub DG1_Keypress(Keyascii As Integer) On Error GoTo salah Keyascii = Asc(UCase(Chr(Keyascii))) If Keyascii = 27 Then DT.SelText = Right(List1.Update Next i End Function Function Kurangi_Baris() For i = DT.Recordset.1 End If On Error GoTo 0 Exit Sub salah: cmdbatal_Click End Sub Private Sub List1_keyPress(Keyascii As Integer) If Keyascii = 13 Then If DG1.RecordCount To DT.Recordset!Jumlah = Null DT.com TxtNomorAgt.Recordset. 4) DT.Enabled = True Call Pinjaman TxtNomorAgt.000.Recordset!Judul = Null DT.RecordCount DT.Recordset.Caption = "" LblTotalPjm.Update Call Kurangi_Baris LblTotalPjm.Caption = "" LbltelahPjm.Delete DT.Recordset.RecordCount To DT.Caption = DT.Update Call BukaDB 4 .Recordset.RecordCount DT.Recordset.Recordset!Nomor = i + 1 DT.RecordCount .Recordset. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an. Uus Rusmawan Email : uusrusmawan@yahoo.com Harga program Rp.Caption = "" End Sub Private Sub cmdbatal_Click() Form_Activate TxtNomorAgt = "" LblNamaAgt = "" LblTotalPjm = "" LbltelahPjm = "" DG1.50.SetFocus Exit Sub End If Sub Bersihkan() TxtNomorAgt = "" LblNamaAgt.Caption = "" Then MsgBox "Tidak ada transaksi peminjaman" TxtNomorAgt.AddNew DT.

www.Recordset.Recordset!Judul = RSBuku!Judul DT.1 If Val(LbltelahPjm) + Val(LblTotalPjm) = 4 Then MsgBox "Pinjaman Sudah Maksimal" DG1.Requery If Not RSBuku. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.com Harga program Rp.Recordset.EOF Then DT.Recordset!Kode = RSBuku!NomorBk DT.RecordCount .000.Recordset!Jumlah = 1 Call Tambah_Baris DT. 'munculkan pesan bahwa pinjaman telah maksimal ElseIf Val(LbltelahPjm) + Val(LblTotalPjm) > 4 Then MsgBox "Pinjaman melebihi batas.Caption = Format(TotalPjm.Caption = DT. Uus Rusmawan Email : uusrusmawan@yahoo.SetFocus Exit Sub 'jika jumlah telah pinjam dan pinjaman sekarang lebih dari 4. Conn RSBuku.AllowUpdate = False CmdSimpan. "##") LblTotalPjm.MoveLast 'LblTotalPjm.Recordset.com RSBuku. 4) & "'". edit jumlah pinjaman" DG1.konsultasivb.50.SetFocus Exit Sub End If End If End If End If End Sub Transaksi Pengembalian Buku 5 .Open "Select * from Buku where nomorBk ='" & Right(List1.AllowAddNew = False DG1.MoveNext DG1.SetFocus CmdSimpan.Col = 1 DT.

Col = 1 Else MsgBox "Nomor anggota tidak terdaftar" TxtNomorAgt. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.Recordset.www.000.Col = 1 LblDenda = 0 LblKembali = 0 TxtDibayar = 0 CmdSimpan.Caption = RSAnggota!Namaagt DG1.SetFocus Exit Sub End If Call Pinjaman If LbltelahPjm = "" Or LbltelahPjm = 0 Then 6 . Uus Rusmawan Email : uusrusmawan@yahoo.Open "Select * from anggota where nomoragt='" & TxtNomorAgt & "'".EOF Then LblNamaAgt.SetFocus DG1.Data Source= " & App.Refresh Call AutoNomor LblTanggalKbl.MaxLength = 4 Keyascii = Asc(UCase(Chr(Keyascii))) If Keyascii = 27 Then Unload Me If Keyascii = 13 Then Call BukaDB RSAnggota.Jet.OLEDB.0.MoveFirst DG1.ConnectionString = "Provider=Microsoft. Conn If Not RSAnggota.Path & "\ADOPustaka.com Harga program Rp.konsultasivb.Enabled = False End Sub Private Sub Form_Load() Call BukaDB End Sub Private Sub TxtNomorAgt_KeyPress(Keyascii As Integer) On Error Resume Next TxtNomorAgt.4.com Coding : Private Sub Form_Activate() DT.mdb" DT.Caption = Date Call Tabel_Kosong DT.50.RecordSource = "Transaksi1" Set DG1.DataSource = DT DG1.

Update Next i End Function 7 .Recordset.SetFocus Exit Sub End If End If End Sub Private Sub CmdSimpan_Keypress(Keyascii As Integer) If Keyascii = 27 Then CmdSimpan.SetFocus End If End Sub Private Sub cmdSimpan_Click() If LblTotalKbl.Recordset.www.MoveFirst Do While Not DT.Recordset.50.Recordset RSDenda.Caption = "" LbltelahPjm.Update Next i End Function Function TotalKbl() Set TTlkbl = New adodb.Recordset. Conn JmlDenda = RSDenda!TDenda End Function Private Sub cmdbatal_Click() Call Bersihkan Call Pinjaman TxtNomorAgt.konsultasivb.Delete DT.SetFocus Form_Activate End Sub Private Sub cmdtutup_Click() Unload Me End Sub Function Tambah_Baris() For i = DT.Caption = "" LblTotalKbl.com Harga program Rp.RecordCount To DT.AddNew DT. Conn TotalKbl = TTlkbl!JumTotal End Function Function JmlDenda() Set RSDenda = New adodb.Recordset.Caption = "" End Sub Function Tabel_Kosong() DT.Caption = "" LblDenda = "" TxtDibayar = "" LblKembali.com MsgBox "'" & LblNamaAgt & "' tidak punya pinjaman" TxtNomorAgt.Recordset TTlkbl.Recordset.MoveNext Loop For i = 1 To 1 DT.Recordset!Nomor = i + 1 DT. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.Open "Select sum(Denda) as TDenda from Transaksi1 where denda>=0".Recordset.EOF DT.SetFocus Exit Sub End If Sub Bersihkan() TxtNomorAgt = "" LblNamaAgt.Caption = "" Then MsgBox "Tidak ada transaksi pengembalian" TxtNomorAgt.000.RecordCount DT.Open "select sum(Jumlah) as JumTotal from Transaksi1". Uus Rusmawan Email : uusrusmawan@yahoo.Recordset.Enabled = False TxtDibayar = "" TxtDibayar.Recordset.Recordset.AddNew DT.Recordset!Nomor = i DT.

"#.50.MoveNext DG1.Recordset.Recordset!Judul = DG2.com Harga program Rp.Recordset!NomorPjm = DG2.###.Recordset.000.Columns(1) DT.konsultasivb.Recordset!Jumlah End If If DT.Recordset!Tanggal = DG2.Recordset!Judul = Null DT.###") Call Kurangi_Baris End If End Sub Private Sub DG2_KeyDown(KeyCode As Integer.Recordset.Recordset!NomorBk = DG2.MoveLast LblTotalKbl = Format(TotalKbl.Columns(3) DT.Columns(5) 'jika lama pinjam lebih dari 5 hari 'maka hari keenam dikenakan denda 'sebesar 500 / hari (harga denda per hari dapat diubah) If CDate(DT.Recordset!Tanggal = Null DT.RecordCount To DT.###") LblDenda = Str(JmlDenda) End Sub 8 .Delete DT.Recordset!NomorBk = Null DT.Columns(2) DT.Recordset!Denda = (CDate(LblTanggalKbl) .Col = 1 DT.Recordset!Tanggal) .com Function Kurangi_Baris() For i = DT.Recordset!Jumlah = DG2.Recordset!Denda = 0 End If Call Tambah_Baris DT. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.Recordset!NomorPjm = Null DT.Recordset.Recordset.4) * 500 * DT.Recordset!Denda <= 0 Then DT.###. Uus Rusmawan Email : uusrusmawan@yahoo.www.(DT.Update Next i End Function Private Sub DG1_Keypress(Keyascii As Integer) On Error Resume Next Keyascii = Asc(UCase(Chr(Keyascii))) If Keyascii = 27 Then DT.Recordset!Tanggal) + 5 > 5 Then DT. "#.Recordset.Recordset!Jumlah = Null DT.Update LblTotalKbl = Format(TotalKbl.Columns(0) DT. Shift As Integer) Select Case KeyCode Case vbKeyReturn Call SelectAllVisible End Select End Sub Sub SelectAllVisible() On Error Resume Next 'pengembalian buku dicari berdasarkan nomor pinjam di grid2 'cukup dengan cara memilih baris kemudian menekan enter DT.RecordCount DT.Recordset.

www.konsultasivb.com Pembuatan Laporan 9 .50.com Harga program Rp.000. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an. Uus Rusmawan Email : uusrusmawan@yahoo.

Close End Sub Private Sub list1_click() Call BukaDB Conn.50.AddItem RSPinjam!NomorPjm RSPinjam.Requery If Not RSPinjam. Conn RSPinjam.com Rincian Peminjaman Buku : Private Sub Form_Load() On Error Resume Next Call BukaDB List1.EOF Then Tanggal = RSPinjam!TanggalPjm RSAnggota.Clear RSPinjam.Open "Select Distinct NomorPjm from Pinjam ".EOF List1.Open "select * from Anggota where NomorAgt='" & RSPinjam!NomorAgt & "'".konsultasivb.000. Uus Rusmawan Email : uusrusmawan@yahoo. Conn Do Until RSPinjam. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.CursorLocation = adUseClient RSPinjam.com Harga program Rp.Open "select * from Pinjam where NomorPjm='" & List1.MoveNext Loop Conn.EOF Then Anggota = RSAnggota!Namaagt 10 . Conn If Not RSAnggota.Text & "'".www.

4.NomorPjm='" & List1 & "'" Adodc1.RecordCount End Sub Private Sub List1_keyPress(Keyascii As Integer) If Keyascii = 27 Then Unload Me End Sub Catatan : Jika hasil dalam Grid kosong setelah memilih nomor pinjam.RecordSource = "select Judul.Pinjam where DetailPjm.Jet. Rincian Pengembalian Buku : Private Sub Form_Load() On Error Resume Next Call BukaDB List1.detailpjm.Close End Sub Private Sub list1_click() Call BukaDB Conn.com Harga program Rp.Requery If Not RSKembali.Text & "'".com Conn.MoveNext Loop Conn.Refresh Set DataGrid1.konsultasivb.Nomorbk and left(detailPjm. jumlahbk as Jumlah from Buku.DataSource = Adodc1 DataGrid1. Conn Do Until RSKembali.AddItem RSKembali!NomorKbl RSKembali.8)=Pinjam.EOF List1.Nomorbk=Buku. Uus Rusmawan Email : uusrusmawan@yahoo.Refresh Jumlah = Adodc1.mdb" Adodc1.0.Open "select * from Kembali where NomorKbl='" & List1.50. Conn RSKembali.OLEDB. itu artinya semua buku telah dikembalikan.CursorLocation = adUseClient RSKembali.EOF Then LblTanggal = RSKembali!TanggalKbl 11 .www.Clear RSKembali. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.NomorPjm and Pinjam.NomorPjm.ConnectionString = "Provider=Microsoft.Path & "\ADOPustaka.Close Adodc1.Recordset.000.Data Source= " & App.Open "Select Distinct NomorKbl from Kembali ".

Recordset.www.Refresh LblJumlah = Adodc1.Denda from Buku.MoveFirst Denda = 0 Do While Not Adodc1.Refresh Set DataGrid1.8)=Kembali. jumlahbk as Jumlah.Close Adodc1.Nomorbk and left(detailKbl.OLEDB.RecordSource = "select Judul.Recordset.Nomorbk=Buku.NomorKbl.NomorKbl and Kembali.com Harga program Rp.com RSAnggota.EOF Denda = Denda + Adodc1. Conn If Not RSAnggota.Jet.NomorKbl='" & List1 & "'" Adodc1.Path & "\ADOPustaka.Kembali where DetailKbl.EOF Then LblAnggota = RSAnggota!Namaagt Conn.Data Source= " & App.Recordset!Denda Adodc1.Open "select * from Anggota where NomorAgt='" & RSKembali!NomorAgt & "'".mdb" Adodc1. Uus Rusmawan Email : uusrusmawan@yahoo.0.RecordCount Call JmlDenda End Sub Private Sub List1_keyPress(Keyascii As Integer) If Keyascii = 27 Then Unload Me End Sub Sub JmlDenda() Adodc1.detailKbl.Recordset.konsultasivb. Peminat silakan transfer ke 066-0525-947 (BCA) atau 156-000-250-214 (Mandiri) atau 0139-0106-3038-504 (BRI) an.DataSource = Adodc1 DataGrid1.50.000.MoveNext Loop LblDenda = Denda End Sub 12 .4.Recordset.ConnectionString = "Provider=Microsoft.

You're Reading a Free Preview

Mengunduh
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->