program pembayaran spp
DESCRIPTION
mmkkTRANSCRIPT
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Program Pembayaran SPP
Langkah awal buat database dengan manaDbSekolah.mdb dengan 5 Tabel sebagi berikut:
Selanjutnya Butat form Pembayaran dengan rancangan sebagai berikut:
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Tool yang digunakan adalah sebagai berikut Lihat table:
TOOL Propertis Name Form Caption : Form Pembayaran SPP FrmSPP TextBox1 Text = Kosongkan TxtNIS TextBox2 Text = Kosongkan TxtNama TextBox3 Text = Kosongkan TxtAlamat TextBox4 Text = Kosongkan TxtJurusan TextBox5 Text = Kosongkan TxtProg TextBox6 Text = Kosongkan TxtKelas TextBox7 Text = 0 TxtSPP TextBox8 Text = 0 TxtPraktek TextBox9 Text = 0 TxtOsis TextBox10 Text = 0 TxtUjian TextBox11 Text = 0 TxtLap TextBox12 Text = 0 TxtAdm TextBox13 Text = 0 TxtBeasiswa TextBox14 Text = 0 TxtTotal
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
TextBox15 Text = 0 TxtBayar TextBox16 Text = 0 TxtKembali TextBox17 Text = Kosongakan TxtOperator Frame Frame1 Label1 Caption = NIS Label1 Label2 Caption = Nama Label2 Label3 Caption = Alamat Label3 Label4 Caption = Jurusan Label4 Label5 Caption = Program Kehlian Label5 Label6 Caption = Kelas Label6 Label7 Caption = SPP Label7 Label8 Caption = Praktek Label8 Label9 Caption = Osis Label9 Label10 Caption = UJian Label10 Label11 Caption = Praktek Lapangan Label11 Label12 Caption = Administrasi Label12 Label13 Caption = 00:00:00 LbJam Label14 Caption = __/__/____ LbTgl Label15 Caption = Operator Label15 Label16 Caption = Pembayaran SPP Label16 Label17 Caption = Beasiswa Label17 Label18 Caption = Total Label18 Label19 Caption = Bayar Label19 Label20 Caption = Kembali Label20 Command Botton1 Caption=Catak/Simpan CmdSimpan Command Botton2 Caption=Refresh CmdRefresh Command Botton3 Caption=Laporan CmdLaporan Adodc1 Adodc1 Adodc2 Adodc2 Adodc3 Adodc3 Adodc4 Adodc4 DataGrid1 DataGrid1 DataGrid2 DataGrid2 DataGrid3 DataGrid3 DataGrid4 DataGrid4 Shape1 BorderWidh= 3 Shape1 Shape2 BorderWidh= 3 Shape2 Shape3 BackStyle= 1-Opaque Shape3 Timer1 Interval =1 Timer1
Kemudian Membuat Menunya dengam memilih menu TOOL kemudian pilih MenuEditor
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Tabel Menu:
Caption Name File nmFile Data Siswa Nmdata - Psh Exit nmExit Laporan Nmlap Laporan Data Siswa Nmdatasiswa Laporan Pembayaran nmPembayaran Seting nmset Seting Nilai Pembayaran snmsetnilai Seting Admin nmsetadm Help nmHelp About NmAbout
Langkah selanjutnya adalah memasukkan kode programnya :
Option Explicit Private koneksi As ADODB.Connection Dim rstabel As New ADODB.Recordset
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
Private Sub CmdLaporan_Click() FrmData.Show End Sub
Private Sub CmdRefrash_Click() TxtNIS.Text = "" TxtNama.Text = "" TxtAlamat.Text = "" TxtJurusan.Text = "" TxtProg.Text = "" TxtKelas.Text = "" TxtSPP.Text = "0" TxtPraktek.Text = "0" TxtOsis.Text = "0" TxtUjian.Text = "0" TxtLap.Text = "0" TxtAdm.Text = "0" TxtBeasiswa.Text = "0" TxtTotal.Text = "0" TxtBayar.Text = "0" TxtKembali.Text = "0" End Sub
Private Sub CmdSimpan_Click() With Adodc3.Recordset .AddNew .Fields("NIS") = TxtNIS.Text .Fields("Nama") = TxtNama.Text .Fields("Alamat") = TxtAlamat.Text .Fields("Jurusan") = TxtJurusan.Text .Fields("Program_Keahlian") = TxtProg.Text .Fields("Kelas") = TxtKelas.Text .Fields("SPP") = TxtSPP.Text .Fields("Praktek") = TxtPraktek.Text .Fields("Osis") = TxtOsis.Text .Fields("Ujian") = TxtUjian.Text .Fields("Praktek_Lapangan") = TxtLap.Text .Fields("Administrasi") = TxtAdm.Text .Fields("Beasiswa") = TxtBeasiswa.Text .Fields("Total") = TxtTotal.Text .Fields("Operator") = TxtOperator.Text
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
.Fields("Tanggal") = LbTgl.Caption
.Fields("Jam") = LbJam.Caption End With 'Melaporkan jika sudah tersimpan MsgBox "Data telah di Simpan!", vbInformation + vbOKOnly = vbIgnore Call CmdRefrash_Click End Sub
Private Sub Form_Activate() memanggil nama Operator dari table Aktifvitas Operator TxtOperator.Text = Adodc4.Recordset!Administrator Dim t$ Dim thn$, bln$, tgl$ t = MaskEdBox1.Text If t "__/__/__" Then thn = Right(t, 4) bln = Mid(t, 4, 2) tgl = Left(t, 2) If IsDate(thn & "-" & bln & "-" & tgl) = False Then MaskEdBox1.Text = Format(Now, "dd/MM/yyyy") LbTgl.Caption = MaskEdBox1.Text End If End If End Sub
Private Sub Form_Load() If Not konek() Then MsgBox "Gak bisa terhubung ke database!", vbCritical End End If Adodc1.ConnectionString = koneksi.ConnectionString Adodc1.RecordSource = "Siswa" Set DataGrid1.DataSource = Adodc1 Adodc2.ConnectionString = koneksi.ConnectionString Adodc2.RecordSource = "Seting" Set DataGrid2.DataSource = Adodc2 Adodc3.ConnectionString = koneksi.ConnectionString Adodc3.RecordSource = "Pembayaran" Set DataGrid3.DataSource = Adodc3 Adodc4.ConnectionString = koneksi.ConnectionString Adodc4.RecordSource = "AktifvitasOP" Set DataGrid4.DataSource = Adodc4 End Sub
Private Sub nmAbout_Click() FrmAbout.Show End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub nmdata_Click() Unload Me FrmSiswa.Show End Sub
Private Sub nmdatasiswa_Click() DataReportSiswa.Show End Sub
Private Sub nmExit_Click() If MsgBox("Yakin mau keluar?", vbQuestion + vbYesNo) = vbYes Then Unload Me End If End Sub
Private Sub nmpembayaran_Click() DataReportPembayaran.Show End Sub
Private Sub nmsetadm_Click() FrmAdmin.Show End Sub
Private Sub snmsetnilai_Click() FrmSeting.Show End Sub
Private Sub Timer1_Timer() Dim dblSecond As Double, dblMinute As Double, dblHour As Double dblSecond = Second(Now) * 6 - 90 dblMinute = (Minute(Now) + Second(Now) / 60) * 6 - 90 dblHour = (Hour(Now) + Minute(Now) / 60) * 30 - 90 LbJam.Caption = Format(Now, "hh:mm:ss") End Sub
Private Sub TxtAdm_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtBeasiswa.SetFocus End If End Sub
Private Sub TxtBayar_Change() TxtKembali = Val(TxtBayar.Text) - Val(TxtTotal) End Sub
Private Sub TxtBayar_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Call CmdSimpan_Click End If End Sub
Private Sub TxtBeasiswa_Change() TxtTotal = (Val(TxtSPP.Text) + Val(TxtPraktek.Text) + Val(TxtOsis.Text) + Val(TxtUjian.Text) + Val(TxtLap.Text) + Val(TxtAdm.Text)) - Val(TxtBeasiswa) End Sub
Private Sub TxtBeasiswa_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtBayar.SetFocus End If End Sub
Private Sub TxtNIS_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then memanggil data dari table siswa Adodc1.Recordset.Find "NIS='" + TxtNIS.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then TxtNama.Text = Adodc1.Recordset.Fields("Nama") TxtAlamat.Text = Adodc1.Recordset.Fields("Alamat") TxtJurusan.Text = Adodc1.Recordset.Fields("Jurusan") TxtProg.Text = Adodc1.Recordset.Fields("Keahlian") TxtKelas.Text = Adodc1.Recordset.Fields("Kelas") 'memanggil data dari tabel seting Adodc2.Recordset.Find "Progm_Keahlian='" + TxtProg.Text + "'", , adSearchForward, 1 If Not Adodc2.Recordset.EOF Then TxtSPP.Text = Adodc2.Recordset!SPP TxtPraktek.Text = Adodc2.Recordset!Praktek TxtOsis.Text = Adodc2.Recordset!Osis TxtUjian.Text = Adodc2.Recordset!Ujian TxtLap.Text = Adodc2.Recordset!Praktek_Lap TxtAdm.Text = Adodc2.Recordset!Administrasi TxtBeasiswa.SetFocus Else MsgBox "Maaf, Seting Tidak Ditemukan!" End If Else MsgBox "Maaf, Data Tidak Ditemukan!" TxtNIS.Text = "" TxtNIS.SetFocus End If TxtTotal = (Val(TxtSPP.Text) + Val(TxtPraktek.Text) + Val(TxtOsis.Text) + Val(TxtUjian.Text) + Val(TxtLap.Text) + Val(TxtAdm.Text)) End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Form SiSwa
Tabel Tool :
Tool Propertis Name Form Caption: Data Siswa
BackColor(Biru) FrmSiswa
TextBox1 TxtNIS TextBox2 TxtNama TextBox3 TxtAlamat TextBox4 TxtTmpLahir TextBox5 TxtAgama
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
TextBox6 TxtSkolAsal TextBox7 TxtTahun TextBox8 TxtKeahlian TextBox9 TxtKelas TextBox10 TxtCariName Label1 Caption : NIS Label1 Label2 Caption : Nama Label2 Label3 Caption : Alamat Label3 Label4 Caption : Tempat/Tgl lahir Label4 Label5 Caption : Jenis Kelamin Label5 Label6 Caption : Agama Label6 Label7 Caption : Sekolah asal Label7 Label8 Caption : Tahun Masuk Label8 Label9 Caption : Jurusan Label9 Label10 Caption : Program Keahlian Label10 Label11 Caption : Kelas Label11 DTPicker DTPicker1 ComboBox1 CboKelamin ComboBox2 CboJurusan Frame Caption :Cari Berdasrkan
Nama Frame1
CommandBotton1 Caption: Simpan CmdSimpan CommandBotton2 Caption: Batal CmdBatal CommandBotton3 Caption: Edit CmdEdit CommandBotton4 Caption: Hapus CmdHapus CommandBotton5 Caption: Exit CmdExit CommandBotton6 Caption: Cetak CmdCatek CommandBotton7 Caption: Reafresh CmdRefrash CommandBotton8 Caption: Cari CmdCari Adodc Adodc1 DataGrid DataGrid1
Tabel Menu:
Caption Name File Nmfile Pembayaran nmbayar - psh Exit nmexit Laporan nmLaporan Laporan Siswa nmSiswa Laporan Pembayaran nmpembayaran
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Help nmhelp About nmAbout
Code Programya:
Option Explicit Private koneksi As ADODB.Connection Dim rsseting As New ADODB.Recordset
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
'Prosedur ketika ComboBox di klik Private Sub CboJurusan_Click() If CboJurusan.Tag = "1" Then Exit Sub 'jika kondisi sedang mengisi data keluar aja
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
If CboJurusan.ListIndex > 0 Then rsseting.MoveFirst rsseting.Find "Jurusan='" & CboJurusan.Text & "'" If Not rsseting.BOF And Not rsseting.EOF Then TxtKeahlian.Text = rsseting("Progm_Keahlian") TxtKelas.SetFocus End If End If End Sub
'seting koneksi tabel yang di hubungkan ke comboBox Sub initrecorset() Set rsseting = Nothing Set rsseting = New ADODB.Recordset rsseting.Open "Seting", koneksi, adOpenKeyset, adLockOptimistic End Sub
Private Sub isiComboJurusan() CboJurusan.Clear CboJurusan.AddItem "Pilih Jurusan" CboJurusan.Tag = "1" 'kondisi sedang mengisi data If rsseting.RecordCount
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
TxtTmpLahir.Text = "" DTPicker1.Refresh CboKelamin.Text = "" TxtAgama.Text = "" TxtSkolAsal.Text = "" TxtTahun.Text = "" CboJurusan.Text = "" TxtKeahlian.Text = "" TxtKelas.Text = "" TxtNIS.SetFocus 'merubah title tombol edit CmdEdit.Caption = "Edit" End Sub
'pencarian data dengan menyaring DataGrid Private Sub CmdCari_Click() Adodc1.Recordset.Filter = "Nama ='" & TxtCariName & "'" End Sub
Private Sub CmdCatek_Click() DataReportSiswa.Show End Sub
'prosedure ketika tombol edit di klik Private Sub CmdEdit_Click() If CmdEdit.Caption = "Edit" Then 'merubah title EDIT menjadi UPDATE CmdEdit.Caption = "Update" TxtNIS.SetFocus Else 'proses penggantian data/penympana urang With Adodc1.Recordset .Fields("NIS") = TxtNIS.Text .Fields("Nama") = TxtNama.Text .Fields("Alamat") = TxtAlamat.Text .Fields("Tempat_Lhr") = TxtTmpLahir.Text .Fields("Tgl_Lahir") = Format(DTPicker1, "mm/dd/yyyy") .Fields("JenisKelamin") = CboKelamin.Text .Fields("Agama") = TxtAgama.Text .Fields("Sekolah_Asal") = TxtSkolAsal.Text .Fields("Tahun_Masuk") = TxtTahun.Text .Fields("Jurusan") = CboJurusan.Text .Fields("Keahlian") = TxtKeahlian.Text .Fields("Kelas") = TxtKelas.Text
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
.Update End With Adodc1.Refresh MsgBox "Data telah di Up Date!", vbInformation + vbOKOnly = vbIgnore Call CmdBatal_Click End If End Sub
Private Sub CmdExit_Click() If MsgBox("Yakin mau keluar?", vbQuestion + vbYesNo) = vbYes Then Unload Me End If End Sub
'prosedure hapus Private Sub CmdHapus_Click() 'membuat pertanyaan pengamanan sebelum di papus Dim x As String x = MsgBox(("Anda Yakin data ingin di hapus?"), vbYesNo + vbCritical) If x = vbYes Then 'perintah menghapus data Adodc1.Recordset.Delete Adodc1.Recordset.MoveFirst DataGrid1.ReBind DataGrid1.Refresh 'Membuat laporannya MsgBox "Data telah di Hapus!", vbInformation + vbOKOnly = vbIgnore End If End Sub
Private Sub CmdRefrash_Click() TxtCariName.Text = "" Adodc1.Refresh DataGrid1.Refresh End Sub
Private Sub CmdSimpan_Click() 'mengecek Nomor Induk Siswa untuk mencegah ada yang sama Adodc1.Recordset.Find "NIS='" + TxtNIS.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then MsgBox ("Nomor Induk Siswa Ini" + TxtNIS.Text + Chr(13) + _ "Sudah Ada !") TxtNIS.Text = "" TxtNIS.SetFocus
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Else 'memerikasa data Texbox yang tidak terisi If MsgBox("Anda yakin data sudah benar", vbQuestion + vbYesNo) = vbYes Then If Trim$(TxtNama.Text) = "" Then MsgBox "Nama harus di isi!", vbExclamation TxtNama.SetFocus Exit Sub ElseIf TxtAlamat.Text = "" Then MsgBox "Alamat Siswa Harus di isi!", vbExclamation TxtAlamat.SetFocus Exit Sub ElseIf TxtTmpLahir.Text = "" Then MsgBox "Tempat Lahir Siswa harus di isi!", vbExclamation TxtTmpLahir.SetFocus Exit Sub ElseIf TxtAgama.Text = "" Then MsgBox "Agama Siswa Harus di isi!", vbExclamation TxtAgama.SetFocus Exit Sub ElseIf TxtSkolAsal.Text = "" Then MsgBox "Sekolah asal Siswa harus di isi!", vbExclamation TxtSkolAsal.SetFocus Exit Sub End If End If 'Penyimpanan data ke tabel With Adodc1.Recordset .AddNew .Fields("NIS") = TxtNIS.Text .Fields("Nama") = TxtNama.Text .Fields("Alamat") = TxtAlamat.Text .Fields("Tempat_Lhr") = TxtTmpLahir.Text .Fields("Tgl_Lahir") = Format(DTPicker1, "mm/dd/yyyy") .Fields("JenisKelamin") = CboKelamin.Text .Fields("Agama") = TxtAgama.Text .Fields("Sekolah_Asal") = TxtSkolAsal.Text .Fields("Tahun_Masuk") = TxtTahun.Text .Fields("Jurusan") = CboJurusan.Text .Fields("Keahlian") = TxtKeahlian.Text .Fields("Kelas") = TxtKelas.Text .Update End With 'Melaporkan jika sudah tersimpan MsgBox "Data telah di Simpan!", vbInformation + vbOKOnly = vbIgnore
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
'Mengmanggil perintah yang ada di tombol batal Call CmdBatal_Click End If End Sub
'Menampilakan data saat baris DataGrid di Klik Private Sub DataGrid1_Click() If Adodc1.Recordset.RecordCount
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub nmAbout_Click() FrmAbout.Show End Sub
Private Sub nmbayar_Click() Unload Me FrmSPP.Show End Sub
'pertanyaan sebelum keluar Private Sub nmExit_Click() If MsgBox("Yakin mau keluar?", vbQuestion + vbYesNo) = vbYes Then Unload Me End If End Sub
Private Sub nmpembayaran_Click() DataReportPembayaran.Show End Sub
Private Sub nmSiswa_Click() DataReportSiswa.Show End Sub
Private Sub TxtAgama_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtSkolAsal.SetFocus End If End Sub
Private Sub TxtAlamat_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtTmpLahir.SetFocus End If End Sub
Private Sub TxtKelas_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call CmdSimpan_Click End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub TxtNama_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtAlamat.SetFocus End If End Sub
Private Sub TxtNIS_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Dim x As String 'Memeriksan NIS yang ada di tabel Adodc1.Recordset.Find "NIS='" + TxtNIS.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then 'Juka sudah ada Tmpilkan petanyaan untk edit? x = MsgBox(("NIS Sudah Ada, Apakah Anda Ingin Mengeditnya?"), vbYesNo + vbCritical) 'jika jawabanya Yas maka tampilkn data jika tidak TextBoxNIS di bersihkan & difokoskan If x = vbYes Then TxtNIS.Text = Adodc1.Recordset.Fields("NIS") TxtNama.Text = Adodc1.Recordset.Fields("Nama") TxtAlamat.Text = Adodc1.Recordset.Fields("Alamat") TxtTmpLahir.Text = Adodc1.Recordset.Fields("Tempat_Lhr") DTPicker1.Value = Adodc1.Recordset.Fields("Tgl_Lahir") CboKelamin.Text = Adodc1.Recordset.Fields("JenisKelamin") TxtAgama.Text = Adodc1.Recordset.Fields("Agama") TxtSkolAsal.Text = Adodc1.Recordset.Fields("Sekolah_Asal") TxtTahun.Text = Adodc1.Recordset.Fields("Tahun_Masuk") CboJurusan.Text = Adodc1.Recordset.Fields("Jurusan") TxtKeahlian.Text = Adodc1.Recordset.Fields("Keahlian") TxtKelas.Text = Adodc1.Recordset.Fields("Kelas") Else TxtNIS.Text = "" TxtNIS.SetFocus End If Else TxtNama.SetFocus End If End If End Sub
Private Sub TxtSkolAsal_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtTahun.SetFocus End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub TxtTahun_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CboJurusan.SetFocus End If End Sub
Form Seting
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
TOOL Propetis Name
Form Caption: Seting Pembayaran BackColor: Window Freme StarUpPosition: Center
FrmSeting
label Caption : ID Set Label1 label Caption : Jurusan Label2 label Caption : Program Keahlian Label3 label Caption : SPP Label4 label Caption : Praktek Label5 label Caption : Osis Label6 label Caption : Ujian Label7 label Caption : Praktek Lapangan Label8 label Caption : Administrasi Label9 Shape BordeWidth: 3 Shape1 CommandBotton Caption : Baru CmdSimpan CommandBotton Caption : Batal CmdBatal CommandBotton Caption : Edit CmdEdit CommandBotton Caption : Hapus CmdHapus CommandBotton Caption : Keluar CmdExit Adodc Adodc1 DataGrid DataGrid1
Code programnya:
Option Explicit Private koneksi As ADODB.Connection Dim rstabel As New ADODB.Recordset
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
Sub bersih() TxtJurusan.Text = "" TxtKeahlian.Text = ""
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
TxtSPP.Text = "" TxtPraktek.Text = "0" TxtOsis.Text = "0" TxtUjian.Text = "0" TxtLap.Text = "0" TxtAdm.Text = "0" End Sub
Sub Aktif() TxtJurusan.Enabled = True TxtKeahlian.Enabled = True TxtSPP.Enabled = True TxtPraktek.Enabled = True TxtOsis.Enabled = True TxtUjian.Enabled = True TxtLap.Enabled = True TxtAdm.Enabled = True End Sub
Sub pasif() TxtJurusan.Enabled = False TxtKeahlian.Enabled = False TxtSPP.Enabled = False TxtPraktek.Enabled = False TxtOsis.Enabled = False TxtUjian.Enabled = False TxtLap.Enabled = False TxtAdm.Enabled = False End Sub
Private Sub CmdBatal_Click() bersih pasif CmdSimpan.Caption = "Baru" CmdEdit.Caption = "Edit" CmdHapus.Enabled = True CmdSimpan.Enabled = True End Sub
Private Sub CmdEdit_Click() If CmdEdit.Caption = "Edit" Then TxtID.Enabled = True TxtID.SetFocus Aktif
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
CmdEdit.Caption = "Up Date" CmdSimpan.Enabled = False CmdHapus.Enabled = False Else If MsgBox("Anda yakin data sudah benar", vbQuestion + vbYesNo) = vbYes Then With Adodc1.Recordset .Fields("Jurusan") = TxtJurusan.Text .Fields("SPP") = TxtSPP.Text .Fields("Praktek") = TxtPraktek.Text .Fields("Osis") = TxtOsis.Text .Fields("Ujian") = TxtUjian.Text .Fields("Praktek_Lap") = TxtLap.Text .Fields("Administrasi") = TxtAdm.Text .Update End With Adodc1.Refresh DataGrid1.Refresh MsgBox "Data telah di Update!", vbInformation + vbOKOnly = vbIgnore Call CmdBatal_Click End If End If End Sub
Private Sub CmdExit_Click() If MsgBox("Yakin mau keluar?", vbQuestion + vbYesNo) = vbYes Then Unload Me End If End Sub
Private Sub CmdHapus_Click() Dim x As String x = MsgBox(("Anda Yakin data ingin di hapus?"), vbYesNo + vbCritical) If x = vbYes Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveFirst DataGrid1.ReBind DataGrid1.Refresh MsgBox "Data telah di Hapus!", vbInformation + vbOKOnly = vbIgnore End If End Sub
Private Sub CmdSimpan_Click() If CmdSimpan.Caption = "Baru" Then CmdSimpan.Caption = "Simpan"
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Aktif TxtJurusan.SetFocus Else If MsgBox("Anda yakin data sudah benar", vbQuestion + vbYesNo) = vbYes Then If Trim$(TxtJurusan.Text) = "" Then MsgBox "Jurusan harus di isi!", vbExclamation TxtJurusan.SetFocus Exit Sub ElseIf TxtKeahlian.Text = "" Then MsgBox "Program Keahlian Harus di isi!", vbExclamation TxtKeahlian.SetFocus Exit Sub ElseIf TxtSPP.Text = "" Then MsgBox "SPP harus di isi!", vbExclamation TxtSPP.SetFocus Exit Sub End If With Adodc1.Recordset .AddNew .Fields("Jurusan") = TxtJurusan.Text .Fields("Progm_Keahlian") = TxtKeahlian.Text .Fields("SPP") = TxtSPP.Text .Fields("Praktek") = TxtPraktek.Text .Fields("Osis") = TxtOsis.Text .Fields("Ujian") = TxtUjian.Text .Fields("Praktek_Lap") = TxtLap.Text .Fields("Administrasi") = TxtAdm.Text .Update End With Adodc1.Refresh DataGrid1.Refresh MsgBox "Data telah di Simpan!", vbInformation + vbOKOnly = vbIgnore Call CmdBatal_Click End If End If End Sub
Private Sub Form_Load() If Not konek() Then MsgBox "Gak bisa terhubung ke database!", vbCritical End End If Adodc1.ConnectionString = koneksi.ConnectionString Adodc1.RecordSource = "Seting"
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Set DataGrid1.DataSource = Adodc1 End Sub
Private Sub TxtAdm_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call CmdSimpan_Click End If End Sub
Private Sub TxtID_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Adodc1.Recordset.Find "ID='" + TxtID.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then TxtJurusan.Text = Adodc1.Recordset!Jurusan TxtKeahlian.Text = Adodc1.Recordset!Progm_Keahlian TxtSPP.Text = Adodc1.Recordset!SPP TxtPraktek.Text = Adodc1.Recordset!Praktek TxtOsis.Text = Adodc1.Recordset!Osis TxtUjian.Text = Adodc1.Recordset!Ujian TxtLap.Text = Adodc1.Recordset!Praktek_Lap TxtAdm.Text = Adodc1.Recordset!Administrasi Else MsgBox "Maaf, Data Tidak Ditemukan!" End If End If End Sub Private Sub TxtJurusan_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Adodc1.Recordset.Find "Jurusan='" + TxtJurusan.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then MsgBox "Maaf, Jurusan Keahlian ini sudah ada!" Else TxtKeahlian.SetFocus End If End If End Sub
Private Sub TxtKeahlian_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtSPP.SetFocus End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub TxtLap_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtAdm.SetFocus End If End Sub
Private Sub TxtOsis_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtUjian.SetFocus End If End Sub
Private Sub TxtPraktek_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtOsis.SetFocus End If End Sub
Private Sub TxtSPP_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtPraktek.SetFocus End If End Sub
Private Sub TxtUjian_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtLap.SetFocus End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Form Login
Tabel too Form Login:
TOOL PROPERTIS NAME Form BordeStyle : Fixed Single
StartUpPosition: center FrmLogin
CommandBotton Caption : OK CmdOK CommandBotton Caption : Batal CmdBatal TextBox TxtAdmin TextBox TxtPass TextBox Visible= False TextCek Label Caption:Administrator Name Label1 Label Caption : Password Label2 Label Visible=false LbJam Label Visible=false LbName MaskEdBox Visible =false MaskEdBox1 Adodc Adodc1
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Adodc Adodc2 DataGrid DataGrid1 Datagrid DataGrid2 Timer Interval =1 Timer1
Kode Programnya adalah:
Option Explicit Dim x As Integer Private koneksi As ADODB.Connection
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
Private Sub CmdBatal_Click() Unload Me End Sub
Private Sub CmdOK_Click() If TxtPass.Text = TextCek.Text Then With Adodc2.Recordset .Fields("Administrator") = LbName.Caption .Fields("Tanggal") = MaskEdBox1.Text .Fields("Jam_Login") = LbJam.Caption .Update End With MsgBox "AKSES DITERIMA ! Selamat Datang, " & UCase(TxtAdmin), , "OK" Unload Me FrmSPP.Show Else If x = 3 Then MsgBox "Anda tidak berhak mengoperasikan aplikasi ini!", vbOKOnly + vbCritical, "UnAuthorized" End Else
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
MsgBox "Password& Admin SALAH, masukkan lagi Admin & passwordnya!" & Chr(10) & "Kesempatan anda" & 3 - x & " lagi", vbOKOnly + vbCritical, "Password Salah" x = x + 1 TxtAdmin.Text = "" TxtPass = "" TextCek.Text = "rtbr345435*&^#2325hhutyu6788" TxtAdmin.SetFocus Exit Sub End If End If End Sub
Private Sub Form_Activate() mengatur tiggi form Login FrmLogin.Height = 3300 x = 1 Kode Mengseting tanggal Dim t$ Dim thn$, bln$, tgl$ t = MaskEdBox1.Text If t "__/__/__" Then thn = Right(t, 4) bln = Mid(t, 4, 2) tgl = Left(t, 2) If IsDate(thn & "-" & bln & "-" & tgl) = False Then MaskEdBox1.Text = Format(Now, "dd/MM/yyyy") End If End If End Sub
Private Sub Form_Load() If Not konek() Then MsgBox "Gak bisa terhubung ke database!", vbCritical End End If Adodc1.ConnectionString = koneksi.ConnectionString Adodc1.RecordSource = "Login" Set DataGrid1.DataSource = Adodc1 Adodc2.ConnectionString = koneksi.ConnectionString Adodc2.RecordSource = "AktifvitasOP" Set DataGrid1.DataSource = Adodc2 End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub Timer1_Timer() Jam Hitungan 24 Jam Dim dblSecond As Double, dblMinute As Double, dblHour As Double dblSecond = Second(Now) * 6 - 90 dblMinute = (Minute(Now) + Second(Now) / 60) * 6 - 90 dblHour = (Hour(Now) + Minute(Now) / 60) * 30 - 90 LbJam.Caption = Format(Now, "hh:mm:ss") End Sub
Private Sub TxtAdmin_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Adodc1.Recordset.Find "Adminstrator='" + TxtAdmin.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then TextCek.Text = Adodc1.Recordset!Pasword LbName.Caption = Adodc1.Recordset!Nama Else
End If TxtPass.SetFocus End If End Sub Private Sub TxtPass_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call CmdOK_Click End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
FORM SETING ADMINISTRATOR
Tabel TOOL :
Tool Propertis Name Form Caption: Seting Administrator
BorderStyle :FixedSingle FrmAdmin
TextBox Text: Textadm TextBox Text: Textpass TextBox Text: TxtAdm TextBox Text: TxtPass TextBox Text: TxtNama TextBox Text: *&&^HBBM":JIUvdf*&^$@!) Text1 Label Caption :Administrator Name
Lama BackStyle : Tramforent Label1
Label Caption :Password lama BackStyle : Tramforent
Label2
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Label Caption :Administrator Name baru BackStyle : Tramforent
Label3
Label Caption :Passord Baru BackStyle : Tramforent
Label4
Label Caption :Nama Lengkap BackStyle : Tramforent
Label5
Shape BorderWidth : 3 BorderColor: kuning
Shape1
Shape BorderWidth : 3 BorderColor: kuning
Shape2
Timer Timer1 Timer Timer2 CommandBotton Caption : Ganti CmdGanti CommandBotton Caption : Batal CmdBatal CommandBotton Caption : Tambah CmdTambah CommandBotton Caption : Hapus CmdHapus CommandBotton Caption : Keluar CmdKeluar Adodc Adodc1 DataGrid DataGrid1
Kode Programnya:
Option Explicit Dim posTengah As Integer Private koneksi As ADODB.Connection
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
Sub CekPass() If Textpass.Text = Text1.Text Then Else MsgBox "Adminstrator Name & Password tidak cocok ini!", vbOKOnly + vbCritical, "UnAuthorized" Textadm.Text = ""
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Textpass.Text = "" Text1.Text = "5457hhh43%*tyy*&^.,ll%$$#$#$" End If End Sub
Private Sub CmdBatal_Click() Textadm.Text = "" Textpass.Text = "" TxtAdm.Text = "" TxtPass.Text = "" TxtNama.Text = "" CmdGanti.Caption = "Ganti" CmdTambah.Caption = "Tambah" CmdTambah.Enabled = True CmdKeluar.Enabled = True End Sub
Private Sub CmdGanti_Click() If CmdGanti.Caption = "Ganti" Then CmdGanti.Caption = "Simpan" CmdTambah.Enabled = False CmdKeluar.Enabled = False Textadm.SetFocus Else CekPass With Adodc1.Recordset .Fields("Administrator") = TxtAdm.Text .Fields("Pasword") = TxtPass.Text .Fields("Nama") = TxtNama.Text .Update End With MsgBox "Nana dan Pasword Telah Diganti!", vbInformation + vbOKOnly = vbIgnore Call CmdBatal_Click End If End Sub
Private Sub CmdHapus_Click() Dim x As String x = MsgBox(("Anda Yakin data ingin di hapus?"), vbYesNo + vbCritical) If x = vbYes Then If Textpass.Text = Text1.Text Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveFirst DataGrid1.ReBind
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
DataGrid1.Refresh MsgBox "Operator telah di Hapus!", vbInformation + vbOKOnly = vbIgnore Else MsgBox "Adminstrator Name & Password tidak cocok ini!", vbOKOnly + vbCritical, "UnAuthorized" Textadm.Text = "" Textpass.Text = "" TxtNama.Text = "" Text1.Text = "5457hhh43%*tyy*&^.,ll%$$#$#$" End If End If End Sub
Private Sub CmdKeluar_Click() If MsgBox("Yakin mau keluar?", vbQuestion + vbYesNo) = vbYes Then Keluar End If End Sub Sub Keluar() posTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub CmdTambah_Click() If CmdTambah.Caption = "Tambah" Then CmdGanti.Enabled = False CmdHapus.Enabled = False CmdTambah.Caption = "Simpan" Else If MsgBox("Anda yakin data sudah benar", vbQuestion + vbYesNo) = vbYes Then With Adodc1.Recordset .AddNew .Fields("Adminstrator") = TxtAdm.Text .Fields("Pasword") = TxtPass.Text .Fields("Nama") = TxtNama.Text .Update End With MsgBox "Operator telah di tambah!", vbInformation + vbOKOnly = vbIgnore Call CmdBatal_Click CmdGanti.Enabled = True CmdHapus.Enabled = True End If End If End Sub
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Private Sub Form_Activate() FrmAdmin.Height = 4560 End Sub
Private Sub Form_Load() If Not konek() Then MsgBox "Gak bisa terhubung ke database!", vbCritical End End If Adodc1.ConnectionString = koneksi.ConnectionString Adodc1.RecordSource = "Login" Set DataGrid1.DataSource = Adodc1 Me.Top = Me.Height * -1 Me.Left = (Screen.Width - Me.Width) / 2 posTengah = (Screen.Height - Me.Height) / 2 Me.Timer1.Interval = 50 End Sub
Private Sub Textadm_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Adodc1.Recordset.Find "Adminstrator='" + Textadm.Text + "'", , adSearchForward, 1 If Not Adodc1.Recordset.EOF Then Text1.Text = Adodc1.Recordset!Pasword TxtNama.Text = Adodc1.Recordset!Nama Textpass.SetFocus Else Textpass.SetFocus End If End If End Sub
Private Sub Textpass_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtAdm.SetFocus End If End Sub
Private Sub Timer1_Timer() If Me.Top < posTengah Then Me.Top = Me.Top + ((posTengah - Me.Top) / 2) Else Me.Top = posTengah
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Me.Timer1.Interval = 0 End If End Sub
Private Sub Timer2_Timer() If Me.Top < Screen.Height Then Me.Top = Me.Top + ((Me.Top - posTengah) * 2) Else Unload Me End If End Sub
Private Sub TxtAdm_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtPass.SetFocus End If End Sub
Private Sub TxtPass_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TxtNama.SetFocus End If End Sub
FORM LAPORAN Rancangan Formnya:
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Tabel Tool :
Tool Pripertis Name Form BackColor:BottonText
StartUpPosition: Center FrmData
Label Caption: Ketikan NIS Label1 Label Caption: Nama Siswa Label2 Label Caption: Operator Label3 Label Caption: Tanggal Label4 TextBox TxtCari TextBox TxtNama TextBox TxtOperaotor DTPicker DTPicker1 Frame Frame1 CommandBotton Caption : Refresh BackColor : Kuning
Picture :(ambil gambar) Style:Grafik CmdRefresh
CommandBotton Caption :Hapus BackColor : Merah Picture :(ambil gambar) Style:Grafik
CmdHapus
CommandBotton Caption :Cetak Laporan BackColor : Hijau Picture :(ambil gambar) Style:Grafik
CmdCetak
CommandBotton Caption : Cari CmdCari Adodc Adodc1 DataGrid DataGrid1
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Kode Programnya :
Option Explicit Private koneksi As ADODB.Connection
Private Function konek() As Boolean On Error GoTo out Set koneksi = New ADODB.Connection koneksi.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DbSekolah.mdb;Persist Security Info=False" koneksi.CursorLocation = adUseClient konek = True out: End Function
Private Sub CariNama_Click() Adodc1.Recordset.Filter = "Nama ='" & TxtNama & "'" End Sub
Private Sub CariOP_Click() Adodc1.Recordset.Filter = "Operator='" & TxtOperaotor & "'" End Sub
Private Sub CariTgl_Click() Adodc1.Recordset.Filter = "Tanggal='" & DTPicker1.Value & "'" End Sub
Private Sub CmdCari_Click() If Adodc1.Recordset.RecordCount
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Adodc1.Recordset.Delete Adodc1.Recordset.MoveFirst DataGrid1.ReBind DataGrid1.Refresh MsgBox "Data telah di Hapus!", vbInformation + vbOKOnly = vbIgnore End If End Sub
Private Sub CmdRefresh_Click() Adodc1.Refresh DataGrid1.Refresh End Sub
Private Sub Form_Load() If Not konek() Then MsgBox "Gak bisa terhubung ke database!", vbCritical End End If Adodc1.ConnectionString = koneksi.ConnectionString Adodc1.RecordSource = "Pembayaran" Set DataGrid1.DataSource = Adodc1 End Sub
Private Sub TxtCari_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call CmdCari_Click End If End Sub
FORM ABOUT Rancangan Formnya:
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Tabel TOOL :
Tool Propertis Name
Form BackColor : WindowFrame BordeStyle: FixedSingle
FrmAbout
Label Caption: Program Pembayaran SPP BackStyle: Transfarent font: sesuai keinginan
Label1
Label Caption: Hidayatul Rahman BackStyle: Transfarent SPP font: sesuai keinginan
Label2
Label
Caption: ttp://Edukasi-informatika.blogspot.con BackStyle: Transfarent SPP font: sesuai keinginan
Label3
Image Picture: ambil Icon Image1 Timer Timer1 Timer Timer2 Timer Interval : 6000 Timer3
Kode Programnya :
Option Explicit Private Declare Function ShellExecute Lib _ "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL = 1 Dim posTengah As Integer
Sub Keluar() posTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub
Private Sub Form_Load() Me.Top = Me.Height * -1 Me.Left = (Screen.Width - Me.Width) / 1 posTengah = (Screen.Height - Me.Height) / 2 Me.Timer1.Interval = 50 End Sub
Private Sub Image1_Click() Keluar End Sub
Private Sub Label3_Click() ShellExecute Me.hwnd, _ vbNullString, _ "http://edukasi-informatika.blogspot.com", _ vbNullString, _ "c:\", _ SW_SHOWNORMAL Keluar End Sub
Private Sub Timer1_Timer() If Me.Top < posTengah Then Me.Top = Me.Top + ((posTengah - Me.Top) / 2) Else Me.Top = posTengah Me.Timer1.Interval = 0 End If End Sub
Private Sub Timer2_Timer() If Me.Top < Screen.Height Then
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
Me.Top = Me.Top + ((Me.Top - posTengah) * 2) Else Unload Me End If End Sub
Private Sub Timer3_Timer() Keluar End Sub
MEMBUAT LAPORAN A. Membuat Data Environment 1. Buka project baru 2. Klik menu Project 3. Pilih More Activex Designer 4. Pilih Data Environment 5. Klik kanan Connection 6. Properties.. 7. Pilih Microsoft Jet 3.51 OLE DB Provider (jika database dibuat dengan Visdata) 8. Pilih Microsoft Jet 4.0 OLE DB Provider (jika database dibuat dengan access versi 2000 keatas) 9. Klik Next 10. Klik button Select or enter database name : 11. Pilih database (di direktori tertentu) 12. Open 13. Klik Test Connenction 14. Klik OK 15. Klik OK 16. Klik kanan Connection 17. Pilih Add Command 18. Klik kanan Command1 19. Klik Properties..
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
20. Pada Combo Database Object pilih table
22. Klik Apply 23. OK 24. Hingga tampilannya menjadi seperti gambar di bawah ini
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
B. Membuat Data Report 1. Klik menu project 2. Add Data Report 3. Klik menu Windows 4. Klik Cascade
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
5. Geser beberapa window hingga tampil dua window berikut 6. Drag Command1 ke dalam window DataReport 7. Lalu ubah posisinya seperti gambar berikut
8. Klik button DataSource di window properti 9. Pilih DataEnvironment1 10. Klik button DataMember di window properti 11. Pilih Command1 12. Buatlah sebuah Command Button dalam form
-
Hidayatul Rahman Web : http://edukasi-informatika.blogspot.com
13. Double Click Command 14. Tulis kode program berikut form menu dan tombol cektak laporan
Private Sub Command1_Click() DataReportPembayaran.Show End Sub
15. Jalankan program dan lihat hasilnya 16. Lakukan modifikasi sesuai kebutuhan 17. Simpan file