Jumat, 06 Februari 2015

SOFTWARE ENTRY DATA KTP

DESAIN FORM


SETTING PROPERTY


Keterangan :
  1. NIK
  2. NAMA
  3. Combosex
  4. KELAHIRAN
  5. MASKED TGL
  6. ALAMAT
  7. RTRW
  8. KEL
  9. KEC
  10. KOTA
  11. POS
  12. AGAMA
  13. Combonegara
  14. PEKERJAAN
  15. CombiSTATUS
  16. ComboGODAR
  17. simpan
  18. batal
  19. keluar

DAFTAR DATA


FORMS :

  1. Edit Data
  2. Hapus
  3. Isi Data
  4. Lihat Data
  5. Lihat Data Satu
  6. MDI Form



DESIGNERS :

  1. Data Environment
  2. Data Report
  
FORMS

1. Edit Data

Dim ktp As Database
Dim datktp As Recordset

Private Sub batal_Click()
NIK.Text = ""
combonegara.Text = ""
Combosex.Text = ""
ComboSTATUS.Text = ""
ComboGODAR.Text = ""
MASKEDTGL.Mask = ""
MASKEDTGL.Text = ""
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
PEKERJAAN.Text = ""
End Sub

Private Sub Combosex_Click()
KELAHIRAN.SetFocus
End Sub

KLIK BACA SELENGKAPNYA..

Private Sub Form_Activate()
NIK.SetFocus
combonegara.AddItem "WNI"
combonegara.AddItem "WNA"
Combosex.AddItem "PRIA"
Combosex.AddItem "WANITA"
ComboSTATUS.AddItem "Belum Menikah"
ComboSTATUS.AddItem "Menikah"
ComboGODAR.AddItem "-"
ComboGODAR.AddItem "A"
ComboGODAR.AddItem "B"
ComboGODAR.AddItem "AB"
ComboGODAR.AddItem "O"
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
combonegara.Text = ""
PEKERJAAN.Text = ""
End Sub

Private Sub Form_Load()
Set ktp = OpenDatabase("D:\My Documents\ktp.mdb")
Set datktp = ktp.OpenRecordset("DATA")
datktp.Index = "IDXDAT"
e = MsgBox("Untuk mengedit data, masukkan NIK data yang akan diedit lalu tekan enter", vbInformation, "PERINGATAN")
End Sub


Private Sub Image2_Click()

End Sub

Private Sub keluar_Click()
Unload Me
End Sub

Private Sub NIK_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    datktp.Index = "idxdat"
    datktp.Seek "=", NIK.Text
    If Not datktp.NoMatch Then
    NIK.Text = datktp!NIK
    NAMA.Text = datktp!NAMA
    Combosex.Text = datktp!JEN_KEL
    KELAHIRAN.Text = datktp!KELAHIRAN
    MASKEDTGL.Text = datktp!TGL_LHR
    ALAMAT.Text = datktp!ALAMAT
    RTRW.Text = datktp!RTRW
    KEL.Text = datktp!KELURAHAN
    KEC.Text = datktp!KECAMATAN
    KOTA.Text = datktp!KOTA
    POS.Text = datktp!KODEPOS
    AGAMA.Text = datktp!AGAMA
    combonegara.Text = datktp!KEWARGANEGARAAN
    PEKERJAAN.Text = datktp!PEKERJAAN
    ComboSTATUS.Text = datktp!PERKAWINAN
    ComboGODAR.Text = datktp!GODAR
    Else
    e = MsgBox("Data Yang Anda Cari Tidak Ada", vbInformation, "PERINGATAN")
End If
End If
End Sub
Private Sub NAMA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Combosex.SetFocus
End If
End Sub
Private Sub kelahiran_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   MASKEDTGL.SetFocus
End If
End Sub
Private Sub maskedtgl_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   ALAMAT.SetFocus
End If
End Sub
Private Sub alamat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   RTRW.SetFocus
End If
End Sub
Private Sub rtrw_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KEL.SetFocus
End If
End Sub
Private Sub kel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KEC.SetFocus
End If
End Sub
Private Sub kec_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KOTA.SetFocus
End If
End Sub
Private Sub kota_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   POS.SetFocus
End If
End Sub
Private Sub pos_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   AGAMA.SetFocus
End If
End Sub
Private Sub agama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   combonegara.SetFocus
End If
End Sub
Private Sub simpan_Click()
If NIK.Text = "" Then
e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        NIK.SetFocus
    Exit Sub
End If
If NAMA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        NAMA.SetFocus
    Exit Sub
End If
If Combosex.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        Combosex.SetFocus
    Exit Sub
End If
If KELAHIRAN.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KELAHIRAN.SetFocus
    Exit Sub
End If
If ALAMAT.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ALAMAT.SetFocus
    Exit Sub
End If
If RTRW.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        RTRW.SetFocus
    Exit Sub
End If
If KEL.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KEL.SetFocus
    Exit Sub
End If
If KEC.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KEC.SetFocus
    Exit Sub
End If
If KOTA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KOTA.SetFocus
    Exit Sub
End If
If POS.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        POS.SetFocus
    Exit Sub
End If
If AGAMA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        AGAMA.SetFocus
    Exit Sub
End If
If combonegara.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        combonegara.SetFocus
    Exit Sub
End If
If PEKERJAAN.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        PEKERJAAN.SetFocus
    Exit Sub
End If
If ComboSTATUS.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ComboSTATUS.SetFocus
    Exit Sub
End If
If ComboGODAR.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ComboGODAR.SetFocus
    Exit Sub
End If
With datktp
.Edit
.Fields("NIK").Value = NIK.Text
.Fields("NAMA").Value = NAMA.Text
.Fields("JEN_KEL").Value = Combosex.Text
.Fields("KELAHIRAN").Value = KELAHIRAN.Text
.Fields("TGL_LHR").Value = CDate(MASKEDTGL.Text)
.Fields("ALAMAT").Value = ALAMAT.Text
.Fields("RTRW").Value = RTRW.Text
.Fields("KELURAHAN").Value = KEL.Text
.Fields("KECAMATAN").Value = KEC.Text
.Fields("KOTA").Value = KOTA.Text
.Fields("KODEPOS").Value = POS.Text
.Fields("AGAMA").Value = AGAMA.Text
.Fields("KEWARGANEGARAAN").Value = combonegara.Text
.Fields("PEKERJAAN").Value = PEKERJAAN.Text
.Fields("PERKAWINAN").Value = ComboSTATUS.Text
.Fields("GODAR").Value = ComboGODAR.Text
.Update
End With
NIK.Text = ""
NIK.SetFocus
Combosex.Text = ""
ComboSTATUS.Text = ""
ComboGODAR.Text = ""
MASKEDTGL.Mask = ""
MASKEDTGL.Text = ""
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
combonegara.Text = ""
PEKERJAAN.Text = ""
End Sub
Private Sub combonegara_click()
   PEKERJAAN.SetFocus
End Sub
Private Sub pekerjaan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   ComboSTATUS.SetFocus
End If
End Sub
Private Sub combostatus_click()
   ComboGODAR.SetFocus
End Sub
Private Sub combogodar_click()
   simpan.SetFocus
End Sub

2. Hapus

Dim ktp As Database
Dim datktp As Recordset

Private Sub batal_Click()
NIK.SetFocus
NIK.Text = ""
Combosex.Text = ""
ComboSTATUS.Text = ""
ComboGODAR.Text = ""
MASKEDTGL.Mask = ""
MASKEDTGL.Text = ""
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
combonegara.Text = ""
PEKERJAAN.Text = ""
End Sub

Private Sub Form_Activate()
NIK.SetFocus
End Sub

Private Sub Form_Load()
Set ktp = OpenDatabase("D:\My Documents\ktp.mdb")
Set datktp = ktp.OpenRecordset("DATA")
datktp.Index = "IDXDAT"
rizky = MsgBox("Untuk menghapus data, masukkan NIK data yang akan dihapus lalu tekan enter", vbInformation, "PERINGATAN")
End Sub

Private Sub Hapus_Click()
rizky = MsgBox("Anda Yakin Menghapus", vbYesNo + vbQuestion, "Peringatan")
If rizky = 6 Then
    datktp.Delete
    NIK.SetFocus
    NIK.Text = ""
    Combosex.Text = ""
    ComboSTATUS.Text = ""
    ComboGODAR.Text = ""
    MASKEDTGL.Mask = ""
    MASKEDTGL.Text = ""
    MASKEDTGL.Mask = "##/##/####"
    NAMA.Text = ""
    KELAHIRAN.Text = ""
    ALAMAT.Text = ""
    RTRW.Text = ""
    KEL.Text = ""
    KEC.Text = ""
    KOTA.Text = ""
    POS.Text = ""
    AGAMA.Text = ""
    combonegara.Text = ""
    PEKERJAAN.Text = ""
Else
    NIK.Text = ""
    NIK.SetFocus
    Combosex.Text = ""
    ComboSTATUS.Text = ""
    ComboGODAR.Text = ""
    MASKEDTGL.Mask = ""
    MASKEDTGL.Text = ""
    MASKEDTGL.Mask = "##/##/####"
    NAMA.Text = ""
    KELAHIRAN.Text = ""
    ALAMAT.Text = ""
    RTRW.Text = ""
    KEL.Text = ""
    KEC.Text = ""
    KOTA.Text = ""
    POS.Text = ""
    AGAMA.Text = ""
    combonegara.Text = ""
    PEKERJAAN.Text = ""
End If
End Sub

Private Sub Image2_Click()

End Sub

Private Sub keluar_Click()
Unload Me
End Sub

Private Sub Label5_Click()

End Sub

Private Sub NIK_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    datktp.Index = "idxdat"
    datktp.Seek "=", NIK.Text
    If Not datktp.NoMatch Then
    NIK.Text = datktp!NIK
    NAMA.Text = datktp!NAMA
    Combosex.Text = datktp!JEN_KEL
    KELAHIRAN.Text = datktp!KELAHIRAN
    MASKEDTGL.Text = datktp!TGL_LHR
    ALAMAT.Text = datktp!ALAMAT
    RTRW.Text = datktp!RTRW
    KEL.Text = datktp!KELURAHAN
    KEC.Text = datktp!KECAMATAN
    KOTA.Text = datktp!KOTA
    POS.Text = datktp!KODEPOS
    AGAMA.Text = datktp!AGAMA
    combonegara.Text = datktp!KEWARGANEGARAAN
    PEKERJAAN.Text = datktp!PEKERJAAN
    ComboSTATUS.Text = datktp!PERKAWINAN
    ComboGODAR.Text = datktp!GODAR
    Else
    e = MsgBox("Data Yang Anda Cari Tidak Ada", vbInformation, "PERINGATAN")
End If
End If
End Sub


3. Isi Data

Dim ktp As Database
Dim datktp As Recordset

Private Sub batal_Click()
NIK.Text = ""
Combosex.Text = ""
ComboSTATUS.Text = ""
ComboGODAR.Text = ""
MASKEDTGL.Mask = ""
MASKEDTGL.Text = ""
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
combonegara.Text = ""
PEKERJAAN.Text = ""
End Sub


Private Sub Combosex_Click()
KELAHIRAN.SetFocus
End Sub

Private Sub Form_Activate()
NIK.SetFocus
combonegara.AddItem "WNI"
combonegara.AddItem "WNA"
Combosex.AddItem "PRIA"
Combosex.AddItem "WANITA"
ComboSTATUS.AddItem "Belum Menikah"
ComboSTATUS.AddItem "Menikah"
ComboGODAR.AddItem "-"
ComboGODAR.AddItem "A"
ComboGODAR.AddItem "B"
ComboGODAR.AddItem "AB"
ComboGODAR.AddItem "O"
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
PEKERJAAN.Text = ""
End Sub

Private Sub Form_Load()
Set ktp = OpenDatabase("D:\My Documents\ktp.mdb")
Set datktp = ktp.OpenRecordset("DATA")
datktp.Index = "IDXDAT"
End Sub

Private Sub Image2_Click()

End Sub

Private Sub keluar_Click()
Unload Me
End Sub

Private Sub NIK_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    NAMA.SetFocus
End If
End Sub
Private Sub NAMA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Combosex.SetFocus
End If
End Sub
Private Sub kelahiran_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   MASKEDTGL.SetFocus
End If
End Sub
Private Sub maskedtgl_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   ALAMAT.SetFocus
End If
End Sub
Private Sub alamat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   RTRW.SetFocus
End If
End Sub
Private Sub rtrw_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KEL.SetFocus
End If
End Sub
Private Sub kel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KEC.SetFocus
End If
End Sub
Private Sub kec_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   KOTA.SetFocus
End If
End Sub
Private Sub kota_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   POS.SetFocus
End If
End Sub
Private Sub pos_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   AGAMA.SetFocus
End If
End Sub
Private Sub agama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   combonegara.SetFocus
End If
End Sub
Private Sub simpan_Click()
If NIK.Text = "" Then
e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        NIK.SetFocus
    Exit Sub
End If
If NAMA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        NAMA.SetFocus
    Exit Sub
End If
If Combosex.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        Combosex.SetFocus
    Exit Sub
End If
If KELAHIRAN.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KELAHIRAN.SetFocus
    Exit Sub
End If
If ALAMAT.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ALAMAT.SetFocus
    Exit Sub
End If
If RTRW.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        RTRW.SetFocus
    Exit Sub
End If
If KEL.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KEL.SetFocus
    Exit Sub
End If
If KEC.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KEC.SetFocus
    Exit Sub
End If
If KOTA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        KOTA.SetFocus
    Exit Sub
End If
If POS.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        POS.SetFocus
    Exit Sub
End If
If AGAMA.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        AGAMA.SetFocus
    Exit Sub
End If
If combonegara.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        combonegara.SetFocus
    Exit Sub
End If
If PEKERJAAN.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        PEKERJAAN.SetFocus
    Exit Sub
End If
If ComboSTATUS.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ComboSTATUS.SetFocus
    Exit Sub
End If
If ComboGODAR.Text = "" Then
    e = MsgBox("Masukkan Data Anda Dengan Lengkap", vbInformation, "PERINGATAN")
        ComboGODAR.SetFocus
    Exit Sub
End If
With datktp
.AddNew
.Fields("NIK").Value = NIK.Text
.Fields("NAMA").Value = NAMA.Text
.Fields("JEN_KEL").Value = Combosex.Text
.Fields("KELAHIRAN").Value = KELAHIRAN.Text
.Fields("TGL_LHR").Value = CDate(MASKEDTGL.Text)
.Fields("ALAMAT").Value = ALAMAT.Text
.Fields("RTRW").Value = RTRW.Text
.Fields("KELURAHAN").Value = KEL.Text
.Fields("KECAMATAN").Value = KEC.Text
.Fields("KOTA").Value = KOTA.Text
.Fields("KODEPOS").Value = POS.Text
.Fields("AGAMA").Value = AGAMA.Text
.Fields("KEWARGANEGARAAN").Value = combonegara.Text
.Fields("PEKERJAAN").Value = PEKERJAAN.Text
.Fields("PERKAWINAN").Value = ComboSTATUS.Text
.Fields("GODAR").Value = ComboGODAR.Text
.Update
End With
NIK.Text = ""
NIK.SetFocus
Combosex.Text = ""
ComboSTATUS.Text = ""
ComboGODAR.Text = ""
MASKEDTGL.Mask = ""
MASKEDTGL.Text = ""
MASKEDTGL.Mask = "##/##/####"
NAMA.Text = ""
KELAHIRAN.Text = ""
ALAMAT.Text = ""
RTRW.Text = ""
KEL.Text = ""
KEC.Text = ""
KOTA.Text = ""
POS.Text = ""
AGAMA.Text = ""
combonegara.Text = ""
PEKERJAAN.Text = ""
End Sub
Private Sub combonegara_click()
   PEKERJAAN.SetFocus
End Sub
Private Sub pekerjaan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   ComboSTATUS.SetFocus
End If
End Sub
Private Sub combostatus_click()
   ComboGODAR.SetFocus
End Sub
Private Sub combogodar_click()
   simpan.SetFocus
End Sub

 


4. Lihat Data


Dim ktp As Database
Dim datktp As Recordset

Private Sub cetak_Click()
With datktp
.OpenRecordset
Printer.PrintQuality = -2
Printer.FontSize = 10
Printer.Print Tab(10); "N.I.K                "; Tab(33); ":"; Tab(35); NIK.Text
Printer.Print Tab(10); "Nama                 "; Tab(33); ":"; Tab(35); NAMA.Text
Printer.Print Tab(10); "Jenis Kelamin        "; Tab(33); ":"; Tab(35); Combosex.Text
Printer.Print Tab(10); "Kelahiran            "; Tab(33); ":"; Tab(35); KELAHIRAN.Text; Tab(49); MASKEDTGL.Text
Printer.Print Tab(10); "Alamat               "; Tab(33); ":"; Tab(35); ALAMAT.Text
Printer.Print Tab(20); "R.T / R.W            "; Tab(40); ":"; Tab(42); RTRW.Text
Printer.Print Tab(20); "Kelurahan            "; Tab(40); ":"; Tab(42); KEL.Text
Printer.Print Tab(20); "Kecamatan            "; Tab(40); ":"; Tab(42); KEC.Text
Printer.Print Tab(20); "Kota                 "; Tab(40); ":"; Tab(42); KOTA.Text
Printer.Print Tab(20); "Kode POS             "; Tab(40); ":"; Tab(42); POS.Text
Printer.Print Tab(10); "Agama                "; Tab(33); ":"; Tab(35); AGAMA.Text
Printer.Print Tab(10); "Kewarganegaraan      "; Tab(33); ":"; Tab(35); combonegara.Text
Printer.Print Tab(10); "Pekerjaan            "; Tab(33); ":"; Tab(35); PEKERJAAN.Text
Printer.Print Tab(10); "Status Perkawinan    "; Tab(33); ":"; Tab(35); ComboSTATUS.Text
Printer.Print Tab(10); "Golongan Darah       "; Tab(33); ":"; Tab(35); ComboGODAR.Text
End With
End Sub

Private Sub Form_Load()
Set ktp = OpenDatabase("D:\My Documents\ktp.mdb")
Set datktp = ktp.OpenRecordset("DATA")
datktp.Index = "IDXDAT"
End Sub



Private Sub keluar_Click()
Unload Me
End Sub


5. Lihat Data Satu

Dim ktp As Database
Dim datktp As Recordset

Private Sub cetak_Click()
With datktp
.OpenRecordset
Printer.PrintQuality = -2
Printer.FontSize = 10
Printer.Print Tab(10); "N.I.K                "; Tab(33); ":"; Tab(35); NIK.Text
Printer.Print Tab(10); "Nama                 "; Tab(33); ":"; Tab(35); NAMA.Text
Printer.Print Tab(10); "Jenis Kelamin        "; Tab(33); ":"; Tab(35); Combosex.Text
Printer.Print Tab(10); "Kelahiran            "; Tab(33); ":"; Tab(35); KELAHIRAN.Text; Tab(49); MASKEDTGL.Text
Printer.Print Tab(10); "Alamat               "; Tab(33); ":"; Tab(35); ALAMAT.Text
Printer.Print Tab(20); "R.T / R.W            "; Tab(40); ":"; Tab(42); RTRW.Text
Printer.Print Tab(20); "Kelurahan            "; Tab(40); ":"; Tab(42); KEL.Text
Printer.Print Tab(20); "Kecamatan            "; Tab(40); ":"; Tab(42); KEC.Text
Printer.Print Tab(20); "Kota                 "; Tab(40); ":"; Tab(42); KOTA.Text
Printer.Print Tab(20); "Kode POS             "; Tab(40); ":"; Tab(42); POS.Text
Printer.Print Tab(10); "Agama                "; Tab(33); ":"; Tab(35); AGAMA.Text
Printer.Print Tab(10); "Kewarganegaraan      "; Tab(33); ":"; Tab(35); combonegara.Text
Printer.Print Tab(10); "Pekerjaan            "; Tab(33); ":"; Tab(35); PEKERJAAN.Text
Printer.Print Tab(10); "Status Perkawinan    "; Tab(33); ":"; Tab(35); ComboSTATUS.Text
Printer.Print Tab(10); "Golongan Darah       "; Tab(33); ":"; Tab(35); ComboGODAR.Text
End With
End Sub

Private Sub Form_Load()
Set ktp = OpenDatabase("D:\My Documents\ktp.mdb")
Set datktp = ktp.OpenRecordset("DATA")
datktp.Index = "IDXDAT"
End Sub



Private Sub keluar_Click()
Unload Me
End Sub




6. MDI From


Private Sub mdata_Click()
DataReport1.Show
Unload editdata
Unload isidata
Unload lihatdatasatu
Unload DataReport1
Unload lihatdata
Unload Hapus
End Sub

Private Sub medit_Click()
editdata.Show
Unload isidata
Unload lihatdatasatu
Unload DataReport1
Unload lihatdata
Unload Hapus
End Sub

Private Sub mhps_Click()
Hapus.Show
Unload lihatdatasatu
Unload DataReport1
Unload lihatdata
Unload editdata
Unload isidata
End Sub

Private Sub misi_Click()
isidata.Show
Unload lihatdatasatu
Unload DataReport1
Unload lihatdata
Unload editdata
Unload Hapus

End Sub

Private Sub mkel_Click()
Unload Me
End Sub

Private Sub mlapor_Click()
DataReport1.Show
Unload isidata
Unload lihatdatasatu
Unload lihatdata
Unload editdata
Unload Hapus
End Sub

Private Sub msatu_Click()
lihatdatasatu.Show
Unload isidata
Unload DataReport1
Unload lihatdata
Unload editdata
Unload Hapus
End Sub

Private Sub msemua_Click()
lihatdata.Show
Unload isidata
Unload lihatdatasatu
Unload DataReport1
Unload editdata
Unload Hapus
End Sub

DESIGNERS


1. Data Environment


2. Data Report

















0 komentar:

Posting Komentar