SURAT KETERANGAN. Hasil Uji Program Tugas Akhir

dokumen-dokumen yang mirip
HandleError: MsgBox "Proses tidak bisa dikerjakan.", vbinformation, "Perhatian" On Error GoTo 0 End Sub

SURAT KETERANGAN Hasil Uji Program Tugas Akhir

BAB VI PENUTUP. Simpan Pinjam Koperasi Nurani Timor Kupang adalah: secara cepat, tepat dan akurat. dengan cepat, tepat dan akurat.

Listing Program. 1. Loading. 2. Home. Option Explicit. Dim isplash As Integer. Private Sub Timer1_Timer() On Error Resume Next. isplash = isplash + 5

Listing Program a. Form Login. Public LoginSucceeded As Boolean

FORM LOGIN. Option Explicit. Private Sub cmdexit_click() End End Sub

LISTING PROGRAM. Script Menu Utama Pada Game Tebak Kata

KONEKSI VB DENGAN MYSQL (Wajib, S.Pd.)

BAHASA PEMROGRAMAN (LISTING PROGRAM)

LISTING PROGRAM. lbljalan.caption = "Selamat Menggunakan Kamus Digital Istilahistilah

Me.Picture = LoadPicture(App.Path & "\pakar.jpg") App.HelpFile = App.Path & "\Help.hlp" End Sub

LAMPIRAN. Source Code Program Untuk MDI Utama

Kartu Bimbingan Tugas Akhir Mahhasiswa

Copyright by : ipi-leppindo jambi all reserved 2014 (japikinfo.com)

LISTING PROGRAM. Kode Form Splash Screen. Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.

Membuat Form Input Barang (Untuk Server)

LISTING PROGRAM. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) ShowInputForm End Sub

Pemrograman Database dengan perintah SQL

Pertemuan III MENYIMPAN REKAMAN (RECORD) KE DALAM BASIS DATA

Listing Program. Listing Form Login. Listing Form Menu Utama Private Sub MnDataPenerbangan_Click() FR_Penerbangan.Show 1 End Sub

Field Tipe Data Size Keterangan userid Text 12 Primary key namauser Text 30 - password Text 8 - akses Text 10 -

Listing Program. 1. FrmUser.frm

Buka Project Baru simpan dengan PUSTAKA Buat Form Baru untuk pengisian Data Anggota dan simpan dengan nama frmanggota

Bahasa Pemrograman-1 (Visual Basic)

LISTING PROGRAM. 1. Animasi Awal (animasiawal.frm) Private Sub Form_Load() ButtonClick = 0 Timer1.Enabled = True Timer1.Interval = 50 End Sub

L-2. Listing Program Form Utama. Private Sub Form_Activate() Option3.SetFocus End Sub. Private Sub MnuKeluar_Click() End End Sub

Gambar 1 Table Petugas. Gambar 2 Penambahan Komonen Pada Form

Tutorial, Source code, Request Program Visual Basic

LISTING PROGRAM FORM MENU UTAMA. Private Sub Command1_Click() Unload Me Form2.Show End Sub. Private Sub Command3_Click() Form10.

Praktikum 4 Program Aplikasi Bisnis Imam Gunawan, M. Kom 1. Tambahkan tabel berikut, pada database stockgudang :

L A M P I R A N. Universitas Sumatera Utara

KODE PROGRAM FORM PENJUALAN

LISTING PROGRAM. Public Declare Sub PortOut Lib "io.dll" (ByVal Port As Integer, ByVal Value As Byte)

DATA. No Nama Bagian NRK Jabatan Golongan Pendidikan. 1 Ahmad Akbar PL Tukang Listrik Sounsistim IC/0 STM

LISTING PROGRAM. tanya = MsgBox("Apakah Anda yakin akan menghapus. kata : " & txtword.text & "?", vbquestion + gadoconn.

MEMBACA RECORD DENGAN ADODC

BAB 2 PEMBUATAN APLIKASI PERPUSTAKAAN SEKOLAH

LAMPIRAN. Kode Program Menu Utama

DAFTAR KODE PROGRAM KODE FORM LOGIN

SISTEM INFORMASI ADMINISTRASI

Praktikum-19 AMIK-STMIK JAYANUSA Imam Gunawan, M. Kom FORM BARANG MASUK

Studi Kasus KASUS 1: KONVERSI SUHU

Basic Programing Visual Basic


1. Buka Visual Basic 6 sobat. Buat project baru, masukkan componen Microsoft Winsock Control 2. Masukkan coding berikut

4. Lalu klik Worksheet List Car dan buat kolom seperti ini :

L - 1. Tampilan Aplikasi ( Form Menu Utama ) Tampilan Form login

GAMBAR IV.21 FORM LOGIN

SURAT KETERANGAN. Hasil Uji Program Tugas Akhir

Kode Program : Koneksi. Klik Kanan Adobrg Pilih ADODC Properties Maka akan muncul tampilan sbb: Instruktur : Nani Purwati

Form Pemasok. Interface. Listing Program. Form Pemasok. Dim koneksi As ADODB.Connection Dim rspemasok As ADODB.Recordset. Dim cari As String

Universitas Sumatera Utara

1. Rancangan Input Program Form Menu Utama Form Data Barang [ Input Barang ]

DAFTAR PUSTAKA. pada PT. Restu Mahkota Karya. Sekolah Tinggi Manajemen Informatika dan

BAB IV IMPLEMENTASI DAN PENGUJIAN


Langkah ke 2 yaitu buat database form bukunya seperti gambar dibawah ini

LISTING PROGRAM. Private Sub Form_Load() lblwaktu.caption = Format(Now, "DDDD, d MMMM yyyy End Sub

Program absen dengan menggunakan visual basic 6.0

Gambar 4.60Tampilan Menu Utama

FORM BARANG KELUAR. 1. Buat Table : BarangKeluar, pada Database StockGudang, dengan struktur sebagai berikut :

BAB IV IMPLEMENTASI DAN PENGUJIAN

LISTING PROGRAM. 1. Listing Flash Pembuka. Private Sub Timer1_Timer() ProgressBar1.Value = ProgressBar1.Value + 4. If ProgressBar1.

Pada Visual Basic, anda dapat membuat database dengan menggunakan Visual Data Manager yang dapat diaktifkan dari menu Add Ins, Visual Data Manager

PRAKTIKUM 4 ARRAY DAN SUB ROUTINE

SNIPTEK 2014 ISBN: SISTEM INFORMASI AKUNTANSI JURNAL UMUM TELKOMSEL SUKABUMI

KARTU BIMBINGAN TUGAS AKHIR MAHASISWA

Oracle dengan Visual Basic. Arif Basofi Politeknik Elektronika Negeri Surabaya ITS 2012

Praktikum 5 Program Aplikasi Bisnis Imam Gunawan, M. Kom 1. Tambahkan tabel berikut, pada database stockgudang :

1. Kompetensi Memahami berbagai teknologi pemrograman basis data, khususnya MySQL, pada Visual Basic 6.0.

1. Kompetensi Memahami berbagai teknologi pemrograman basis data, khususnya MySQL, pada Visual Basic 6.0.

Contoh Aplika Aplik si a VB dengan Database Oracle 1

Pembahasan Pada Asistensi Mengenai, Pada Bab: 1 Pengajuan Proposal

FUNGSI PENCABANGAN DAN PERULANGAN

PERANCANGAN SISTEM INFORMASI KESISWAAN DAN KEPEGAWAIAN SMP NEGERI 3 PONOROGO BERBASIS VISUAL BASIC 6.0 SKRIPSI

DISUSUN OLEH : : Friska Rosalina NIM :



BAB 1 KONSEP DASAR...

KARTU BIMBINGAN TUGAS AKHIR MAHASISWA

Tambahkan Form Baru untuk pengisian user login (password pemakaian) dan simpan dengan nama frmlogin

MODUL D :// Mahasiswa memahami konsep pembuatan database. Mahasiswa memahami konsep pembuatan program dasar aplikasi database

Private Sub cmdprint_click() WebBrowser1.ExecWB OLECMDID_PRINT,OLECMDEXECOPT_DODEFAULT End Sub

j = dengan menggunakan fungsi aktivasi untuk menghitung sinyal outputnya:

Pertemuan-1 TIPE DATA STRUKTUR


LAMPIRAN A : LISTING PROGRAM

Pemrograman Database I. Danu Wira Pangestu 1. Konsep Dasar. Lisensi Dokumen:

LAMPIRAN. Dim WithEvents diagnosa As New DB_MYSQL Dim sql = "select * from gejala order by kode asc"


Mengerti dan memahami pemrograman berbasis object Mengerti dan memahami pembuatan visualisasi untuk interface

PROGRAM RENTAL VCD DENGAN MICROSOFT VISUAL BASIC 6.0

BAB IV IMPLEMENTASI DAN PENGUJIAN. Setelah dilakukan tahap analisis dan perancangan sistem, maka tahap

BAB IV IMPLEMENTASI DAN PENGUJIAN. Dalam pembuatan program ini penulis menggunakan Visual Basic. Net

PENGOLAHAN DATA PENGIRIMAN PAKET DI PT POS INDONESIA SURAKARTA MENGGUNAKAN BAHASA PEMROGRAMAN VISUAL BASIC 6.0

BAB IV IMPLEMENTASI DAN PENGUJIAN

KARTU BIMBINGAN TUGAS AKHIR MAHASISWA

8. Leong, Marlon Dari Programer untuk Programer Visual Basic.

Coding : Coding : Oleh : Uus Rusmawan Hal - 1

PEMROGRAMAN CLIENT. Latihan 1. Buka IDE Visual Basic dan buat project baru, simpan pada folder anda masingmasing.

Transkripsi:

SURAT KETERANGAN Hasil Uji Program Tugas Akhir Yang bertanda tangan dibawah ini, menerangkan bahwa Mahasiswa Tugas Akhir Program Diploma III Teknik Informatika/Statistika : Nama : KHAIRUL TAMIMI NIM : 082406195 Prog. Studi : Teknik Informatika Judul TA : PERANCANGAN APLIKASI PENDATAAN DI KLINIK MURNI Telah melaksanakan test program Tugas Akhir Mahasiswa tersebut di atas pada tanggal. Dengan Hasil : Sukses / Gagal Demikian diterangkan untuk digunakan melengkapi syarat pendaftaran Ujian Meja Hijau Tugas Akhir Mahasiswa bersangkutan di Departemen Matematika FMIPA USU Medan. Medan, Mei 2011 Dosen Pembimbing Program Studi D3 Teknik Informatika Dr. Sutarman, M.Sc NIP. 196310261991031001

KEMENTERIAN PENDIDIKAN NASIONAL UNIVERSITAS SUMATERA UTARA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM PROGRAM STUDI D.III TEKNIK INFORMATIKA Jl. Bioteknologi No. 1 Kampus USU MEDAN Telp/FAX. 061-8214290 KARTU BIMBINGAN TUGAS AKHIR MAHASISWA Nama Mahasiswa : KHAIRUL TAMIMI NIM : 082406195 Judul Tugas Akhir : Perancangan Aplikasi Sistem Informasi Pendataan Di Klinik Murni Dosen Pembimbing : Dr. Sutarman, M.Sc Tanggal Mulai Bimbingan : Tanggal Selesai Bimbingan : No. Tanggal Asisten Bimbingan Pembahasan Pada Asisten Mengenai Pada BAB Paraf Dosen Pembimbing Keterangan 1. 2. 3. 4. 5. 6. 7. Kartu ini dikembalikan ke Departemen Matematika bila Bimbingan Mahasiswa telah selesai Diketahui, Departemen Matematika FMIPA USU Ketua Disetujui, Pembimbing Utama/ Penanggung Jawab Prof. Dr. Tulus, M.Si NIP. 196209011988031002 Dr. Sutarman, M.Sc NIP.196310261991031001

Lampiran 1. Menu Utama Dim text As String Private Sub MDIForm_Load() text = " Sistem Informasi Pasien (Klinik Murni)" CheckSoftware frmutama Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) If UnloadMode <> vbformcode Then Cancel = True Private Sub mnuclose_click() End Private Sub mnudaftarpas_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmlappasien.show Private Sub mnudokter_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmdokter.show StatusBar1.Panels(1).text = "Entry Data Dokter,..." Private Sub mnudokterlap_click() 1 frmlapdokter.show Private Sub mnukartu_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmlapkartu.show StatusBar1.Panels(1).text = "Entry Data Obat,..." Private Sub Mnukeluar_Click() Tutup Set TMedis = Nothing End

Private Sub mnuobat_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmobat.show StatusBar1.Panels(1).text = "Entry Data Obat,..." Private Sub mnuobatlap_click() 1 With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Obat.rpt".Password = Chr(10) & "irul".datafiles(0) = App.Path & "\Medis.mdb".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 Private Sub mnupasien_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmpasien.show StatusBar1.Panels(1).text = "Entry Data Pasien,..." Private Sub mnuperiksa_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmpemeriksaan.show StatusBar1.Panels(1).text = "Proses Pemeriksaa Pasien,..." Private Sub mnuperiksalap_click() 1 StatusBar1.Panels(1).text = "Tunggu,..." frmlapmedis.show StatusBar1.Panels(1).text = "Proses Pemeriksaa Pasien,..." Private Sub Timer1_Timer() a = Left(text, 1) b = Len(text) c = Right(text, b - 1) text = c + a StatusBar1.Panels(1).text = text

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index Case 1 frmpasien.show Case 2 frmdokter.show Case 3 frmobat.show Case 4 frmpemeriksaan.show End Select 2. Menu Input Pasien Private Sub cmbkelamin_click() If CmbKelamin.text <> "" Then Fokus txtalamat Private Sub cmbkelamin_keypress(keyascii As Integer) KeyAscii = AutoComplete(CmbKelamin, KeyAscii, True, Ubah) Private Sub cmdbaru_click() 1 If cmdbaru.caption = "&Baru" Then cmdbaru.caption = "&Batal" Fokus txtkode vedit = False cmdcari.enabled = False Semula Private Sub cmdcari_click() Dim cari ulang: cari = InputBox("Masukkan Kode Pasien yang akan di cari...", "Cari Kode Pasien") If cari = "" Then "'" 1 Set TCari = New ADODB.Recordset Kata = "Select * from Pasien where [Kode Pasien]='" & cari & TCari.Open Kata, TMedis, adopendynamic, adlockpessimistic

If TCari.EOF Then TCari.Close Set TCari = Nothing MsgBox "Kode Pasien = " & cari & " tidak ditemukan..", vbinformation, "" DaftarCari TCari.Close Set TCari = Nothing cmdedit.enabled = True cmdhapus.enabled = True cmdbaru.caption = "&Batal" Private Sub cmdedit_click() 1 vedit = True vtrans = True Fokus txtnama cmdhapus.enabled = False cmdsimpan.enabled = True cmdbaru.caption = "&Batal" cmdcari.enabled = False Private Sub cmdhapus_click() On Error GoTo salah If MsgBox("Data Pasien " & txtnama.text & " Akan di hapus..", vbcritical + vbyesno, "Informasi System") = vbyes Then 1 TMedis.BeginTrans Kata = "Delete From [Pasien] Where [Kode Pasien]='" & txtkode.text & "'" TMedis.Execute Kata TMedis.CommitTrans Semula salah: MsgBox "Data tidak dapat di hapus..., coba periksa kembali..", vbinformation Private Sub cmdsimpan_click() 1 If Not vedit Then Simpan Edit

Semula Private Sub cmdtutup_click() Unload Me Sub Semula() Bersih vedit = False vtrans = False cmdsimpan.enabled = False cmdhapus.enabled = False cmdedit.enabled = False cmdbaru.caption = "&Baru" NotAktif DaftarPasien cmdbaru.setfocus cmdcari.enabled = True Sub Bersih() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.text = "" If TypeOf Control Is ComboBox Then Control.text = "" Next Control Sub NotAktif() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Enabled = False If TypeOf Control Is ComboBox Then Control.Enabled = False Next Control Sub Simpan() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Insert Into Pasien values ('" & txtkode.text & "'," & _ "'" & txtnama.text & "','" & txtumur.text & "','" & CmbKelamin.text & "'," & _ "'" & txtalamat.text & "','" & txtkota.text & "','" & txtnomor.text & "','" & txtpekerjaan.text & "')" TMedis.CommitTrans MsgBox "Data Pasien sudah disimpan..", vbinformation, "Sukses" salah:

MsgBox "Data Pasien tidak sukses di simpan...", vbinformation, "Periksa" Sub Edit() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Update Pasien set [Nama Pasien]='" & txtnama.text & "',[Umur]='" & _ txtumur.text & "',[JK]='" & CmbKelamin.text & "',alamat='" & txtalamat.text & "', [Asal KOta]='" & txtkota.text & "', [No telp]='" & txtnomor.text & "',Pekerjaan='" & _ txtpekerjaan.text & "' where [Kode Pasien]='" & txtkode.text & "'" TMedis.CommitTrans MsgBox "Data Pasien sudah di edit..", vbinformation, "Sukses Edit" salah: MsgBox "Data Pasien tidak bisa di edit..",, "Periksa" Private Sub Form_Activate() cmdbaru.enabled = True cmdbaru.setfocus Private Sub Form_Load() Ketengah Me DaftarPasien If Tab1.Tab = 1 Then Tab1.Tab = 0 Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If Not vtrans Then Unload Me Set TPasien = Nothing Set frmpasien = Nothing Kata = MsgBox("Data Pasien belum di simpan..." & vbcrlf & _ "Data Pasien mau di simpan...", vbinformation + vbyesno, "Pasien Belum di Simpan") If Kata = vbyes Then cmdsimpan.enabled = True cmdsimpan_click Set TPasien = Nothing Set frmpasien = Nothing Unload Me Set TPasien = Nothing Set frmpasien = Nothing Unload Me

Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Do Until Me.Top <= -5000 DoEvents Me.Move Me.Left, Me.Top - 10 DoEvents Loop Unload Me Private Sub Lv1_DblClick() With frmpasien.txtkode = Lv1.SelectedItem.SubItems(1).txtNama = Lv1.SelectedItem.SubItems(2).txtUmur = Lv1.SelectedItem.SubItems(3).CmbKelamin.text = Lv1.SelectedItem.SubItems(4).txtAlamat = Lv1.SelectedItem.SubItems(5).txtKota = Lv1.SelectedItem.SubItems(6).txtNomor = Lv1.SelectedItem.SubItems(7).txtPekerjaan = Lv1.SelectedItem.SubItems(8).cmdHapus.Enabled = True.cmdEdit.Enabled = True.cmdBaru.Caption = "&Batal".Tab1.Tab = 0 Private Sub Tab1_Click(PreviousTab As Integer) If Tab1.Tab = 1 Then If Lv1.ListItems.Count = 0 Then MsgBox "Daftar Pasien masih kosong.." & vbcrlf & _ "Entry Data Pasien..." Tab1.Tab = 0 DaftarPasien Sub DaftarPasien() On Error GoTo salah 1 Kata = "Select * From [Pasien] Order By [kode Pasien]" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopenstatic, adlockreadonly Lv1.ListItems.Clear If Not TPasien.EOF Then TPasien.MoveFirst i = 1 While Not TPasien.EOF Set Vbutir = Lv1.ListItems.Add(,, i & ".") Vbutir.SubItems(1) = TPasien![Kode Pasien] Vbutir.SubItems(2) = TPasien![Nama pasien] Vbutir.SubItems(3) = TPasien![Umur] Vbutir.SubItems(4) = TPasien![JK]

Vbutir.SubItems(5) = TPasien![Alamat] Vbutir.SubItems(6) = TPasien![asal Kota] Vbutir.SubItems(7) = TPasien![No telp] Vbutir.SubItems(8) = TPasien![Pekerjaan] TPasien.MoveNext i = i + 1 Wend TPasien.Close Set TPasien = Nothing salah: MsgBox Err.Description Private Sub txtkode_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtkode <> "" Then If Len(txtKode) <> 5 Then MsgBox "Kode Pasien harus di isi sebayak 5 digit..", vbcritical, "System error" Fokus txtkode 1 Kata = "select * from Pasien where [kode Pasien]='" & txtkode.text & "'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then Fokus txtnama TPasien.Close ' Set TPasien = norhing With TPasien txtnama =![Nama pasien] txtalamat =![Alamat] txtumur =![Umur] CmbKelamin.text =![JK] txtnomor =![No telp] txtpekerjaan =![Pekerjaan] cmdedit.enabled = True cmdcari.enabled = False cmdhapus.enabled = True cmdbaru.caption = "&Batal" TPasien.Close Set TPasien = Nothing Private Sub txtkota_keypress(keyascii As Integer)

If KeyAscii = 13 Then If txtkota <> "" Then Fokus txtnomor Private Sub txtnama_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtnama <> "" Then Fokus txtumur Private Sub txtnama_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Private Sub txtalamat_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtalamat <> "" Then Fokus txtkota Private Sub txtnomor_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtnomor <> "" Then Fokus txtpekerjaan Private Sub txtnomor_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("0") & Chr(13) _ And KeyAscii <= Asc("9") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace) Then Beep KeyAscii = 0

Private Sub txtpekerjaan_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtpekerjaan <> "" Then cmdsimpan.enabled = True cmdsimpan.setfocus Private Sub txtpekerjaan_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Private Sub txtumur_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtumur <> "" Then CmbKelamin.Enabled = True CmbKelamin.SetFocus r = SendMessageLong(CmbKelamin.hwnd, CB_SHOWDROPDOWN, True, 0) Private Sub txtumur_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("0") & Chr(13) _ And KeyAscii <= Asc("9") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace) Then Beep KeyAscii = 0 Sub DaftarCari() With TCari txtkode =![Kode Pasien] txtnama =![Nama pasien] txtumur =![Umur] CmbKelamin =![JK] txtalamat =![Alamat] txtkota =![asal Kota] txtnomor =![No telp] txtpekerjaan =![Pekerjaan]

3. Menu Input Dokter Private Sub cmbkelamin_click() If cmbkelamin.text <> "" Then Fokus txtnomor Private Sub cmbkelamin_keypress(keyascii As Integer) KeyAscii = AutoComplete(cmbKelamin, KeyAscii, True, Ubah) Private Sub cmdbaru_click() 1 If cmdbaru.caption = "&Baru" Then cmdbaru.caption = "&Batal" Fokus txtkode vedit = False cmdcari.enabled = False Semula Private Sub cmdcari_click() Dim cari ulang: cari = InputBox("Masukkan Kode Dokter yang akan di cari...", "Cari Kode Dokter") If cari = "" Then 1 Set TCari = New ADODB.Recordset Kata = "Select * from Dokter where [Kode Dokter]='" & cari & "'" TCari.Open Kata, TMedis, adopendynamic, adlockpessimistic If TCari.EOF Then TCari.Close Set TCari = Nothing If MsgBox("Kode Dokter = " & cari & " tidak ditemukan.." & vbcrlf & _ "Apakah masih ada kode Dokter yang akan dicari...", vbinformation + vbyesno) = vbyes Then GoTo ulang ' TCari.Close Set TCari = Nothing DaftarCari Set TCari = Nothing cmdedit.enabled = True

cmdhapus.enabled = True Private Sub cmdedit_click() 1 vedit = True vtrans = True Fokus txtnama cmdhapus.enabled = False cmdsimpan.enabled = True cmdbaru.caption = "&Batal" cmdcari.enabled = False Private Sub cmdhapus_click() On Error GoTo salah If MsgBox("Data Dokter " & Lv1.SelectedItem.SubItems(2) & " Akan di hapus..", vbcritical + vbyesno, "Informasi System") = vbyes Then 1 TMedis.BeginTrans Kata = "Delete From [Dokter] Where [Kode Dokter]='" & txtkode.text & "'" TMedis.Execute Kata TMedis.CommitTrans Semula salah: MsgBox "Data tidak dapat di hapus..., coba periksa kembali..", vbinformation Private Sub cmdsimpan_click() 1 If Not vedit Then Simpan Edit Semula Private Sub cmdtutup_click() Unload Me Sub Semula() Bersih vedit = False vtrans = False cmdsimpan.enabled = False cmdhapus.enabled = False

cmdedit.enabled = False cmdbaru.caption = "&Baru" NotAktif DaftarDokter cmdcari.enabled = True cmdbaru.setfocus Sub Bersih() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.text = "" If TypeOf Control Is ComboBox Then Control.text = "" Next Control Sub NotAktif() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Enabled = False If TypeOf Control Is ComboBox Then Control.Enabled = False Next Control Sub Simpan() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Insert Into Dokter values ('" & txtkode.text & "'," & _ "'" & txtnama.text & "','" & txtalamat.text & "','" & txtkota.text & "','" & cmbkelamin.text & "'," & _ "'" & txtnomor.text & "','" & txtspesialis.text & "')" TMedis.CommitTrans MsgBox "Data Dokter sudah disimpan..", vbinformation, "Sukses" salah: MsgBox "Data Dokter tidak sukses di simpan...", vbinformation, "Periksa" Sub Edit() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Update Dokter set [Nama Dokter]='" & txtnama.text & "',[Alamat]='" & _ txtalamat.text & "',Kota='" & txtkota.text & "', [JK]='" & cmbkelamin.text & "',[No telp]='" & txtnomor.text & "',Spesialis='" & _

txtspesialis.text & "' where [Kode Dokter]='" & txtkode.text & "'" TMedis.CommitTrans MsgBox "Data Dokter sudah di edit..", vbinformation, "Sukses Edit" salah: MsgBox "Data Dokter tidak bisa di edit..",, "Periksa" Private Sub Form_Activate() cmdbaru.enabled = True cmdbaru.setfocus Private Sub Form_Load() Ketengah Me DaftarDokter If Tab1.Tab = 1 Then Tab1.Tab = 0 Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) On Error Resume Next Do Until Me.Top <= -5000 DoEvents Me.Move Me.Left, Me.Top - 10 DoEvents Loop Unload Me Private Sub Form_Unload(Cancel As Integer) If Not vtrans Then Unload Me Set TDokter = Nothing Set frmdokter = Nothing Kata = MsgBox("Data Dokter belum di simpan..." & vbcrlf & _ "Data Dokter mau di simpan...", vbinformation + vbyesno, "Dokter Belum di Simpan") If Kata = vbyes Then cmdsimpan.enabled = True cmdsimpan_click Set TDokter = Nothing Set frmdokter = Nothing Unload Me Set TDokter = Nothing Set frmdokter = Nothing Unload Me

Private Sub Lv1_DblClick() With frmdokter.txtkode = Lv1.SelectedItem.SubItems(1).txtNama = Lv1.SelectedItem.SubItems(2).txtAlamat = Lv1.SelectedItem.SubItems(3).txtKota = Lv1.SelectedItem.SubItems(4).cmbKelamin.text = Lv1.SelectedItem.SubItems(5).txtNomor = Lv1.SelectedItem.SubItems(6).txtSpesialis = Lv1.SelectedItem.SubItems(7).cmdHapus.Enabled = True.cmdEdit.Enabled = True.cmdBaru.Caption = "&Batal".Tab1.Tab = 0 Private Sub Tab1_Click(PreviousTab As Integer) If Tab1.Tab = 1 Then If Lv1.ListItems.Count = 0 Then MsgBox "Daftar Dokter masih kosong.." & vbcrlf & _ "Entry Data Dokter..." Tab1.Tab = 0 DaftarDokter Sub DaftarDokter() On Error GoTo salah 1 Kata = "Select * From [Dokter] Order By [kode Dokter]" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopenstatic, adlockreadonly Lv1.ListItems.Clear If Not TDokter.EOF Then TDokter.MoveFirst i = 1 While Not TDokter.EOF Set Vbutir = Lv1.ListItems.Add(,, i & ".") Vbutir.SubItems(1) = TDokter![Kode Dokter] Vbutir.SubItems(2) = TDokter![Nama dokter] Vbutir.SubItems(3) = TDokter![Alamat] Vbutir.SubItems(4) = TDokter![Kota] Vbutir.SubItems(5) = TDokter![JK] Vbutir.SubItems(6) = TDokter![No telp] Vbutir.SubItems(7) = TDokter![Spesialis] TDokter.MoveNext i = i + 1 Wend TDokter.Close Set TDokter = Nothing salah: MsgBox Err.Description

Private Sub txtkode_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtkode <> "" Then If Len(txtKode) <> 5 Then MsgBox "Kode Dokter harus di isi sebayak 5 digit..", vbcritical, "System error" Fokus txtkode 1 Kata = "select * from Dokter where [kode Dokter]='" & txtkode.text & "'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then Fokus txtnama TDokter.Close ' Set TDokter = norhing With TDokter txtnama =![Nama dokter] txtalamat =![Alamat] cmbkelamin.text =![JK] txtnomor =![No telp] txtspesialis =![Spesialis] cmdedit.enabled = True cmdcari.enabled = False cmdhapus.enabled = True cmdbaru.caption = "&Batal" TDokter.Close Set TDokter = Nothing Private Sub txtkota_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtkota <> "" Then cmbkelamin.enabled = True cmbkelamin.setfocus r = SendMessageLong(cmbKelamin.hwnd, CB_SHOWDROPDOWN, True, 0) Private Sub txtnama_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtnama <> "" Then Fokus txtalamat

Private Sub txtnama_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Private Sub txtalamat_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtalamat <> "" Then Fokus txtkota Private Sub txtnomor_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtnomor <> "" Then Fokus txtspesialis Private Sub txtnomor_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("0") & Chr(13) _ And KeyAscii <= Asc("9") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace) Then Beep KeyAscii = 0 Private Sub txtspesialis_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtspesialis <> "" Then cmdsimpan.enabled = True cmdsimpan.setfocus

Private Sub txtspesialis_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Sub DaftarCari() With TCari txtkode =![Kode Dokter] txtnama =![Nama dokter] cmbkelamin =![JK] txtalamat =![Alamat] txtkota =!Kota txtnomor =![No telp] txtspesialis =![Spesialis] 4. Menu Input Obat Private Sub cmdbaru_click() 1 If cmdbaru.caption = "&Baru" Then cmdbaru.caption = "&Batal" Fokus txtkode vedit = False cmdcari.enabled = False Semula Private Sub cmdcari_click() Dim cari ulang: cari = InputBox("Masukkan Kode Obat yang akan di cari...", "Cari Kode Obat") If cari = "" Then 1 Set TCari = New ADODB.Recordset Kata = "Select * from Obat where [Kode Obat]='" & cari & "'" TCari.Open Kata, TMedis, adopendynamic, adlockpessimistic If TCari.EOF Then TCari.Close Set TCari = Nothing If MsgBox("Kode Obat = " & cari & " tidak ditemukan.." & vbcrlf & _

"Apakah masih ada kode obat yang akan dicari...", vbinformation + vbyesno) = vbyes Then GoTo ulang ' TCari.Close Set TCari = Nothing DaftarCari Set TCari = Nothing cmdedit.enabled = True cmdhapus.enabled = True Private Sub cmdedit_click() 1 vedit = True vtrans = True Fokus txtnama cmdhapus.enabled = False cmdsimpan.enabled = True cmdbaru.caption = "&Batal" cmdcari.enabled = False Private Sub cmdhapus_click() On Error GoTo salah If MsgBox("Data Obat " & Lv1.SelectedItem.SubItems(2) & " Akan di hapus..", vbcritical + vbyesno, "Informasi System") = vbyes Then 1 TMedis.BeginTrans Kata = "Delete From [Obat] Where [Kode Obat]='" & txtkode.text & "'" TMedis.Execute Kata TMedis.CommitTrans Semula salah: MsgBox "Data tidak dapat di hapus..., coba periksa kembali..", vbinformation Private Sub cmdsimpan_click() 1 If Not vedit Then Simpan Edit

Semula Private Sub cmdtutup_click() Unload Me Sub Semula() Bersih vedit = False vtrans = False cmdsimpan.enabled = False cmdhapus.enabled = False cmdedit.enabled = False cmdbaru.caption = "&Baru" NotAktif DaftarObat cmdbaru.setfocus cmdcari.enabled = True Sub Bersih() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.text = "" If TypeOf Control Is ComboBox Then Control.text = "" Next Control Sub NotAktif() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Enabled = False If TypeOf Control Is ComboBox Then Control.Enabled = False Next Control Sub Simpan() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Insert Into Obat values ('" & txtkode.text & "'," & _ "'" & txtnama.text & "','" & txtjenis.text & "')" TMedis.CommitTrans MsgBox "Data Obat sudah disimpan..", vbinformation, "Sukses" salah: MsgBox "Data obat tidak sukses di simpan...", vbinformation, "Periksa"

Sub Edit() On Error GoTo salah 1 TMedis.BeginTrans TMedis.Execute "Update obat set [Nama obat]='" & txtnama.text & "',[Jenis]='" & _ txtjenis.text & "' where [Kode Obat]='" & txtkode.text & "'" TMedis.CommitTrans MsgBox "Data Obat sudah di edit..", vbinformation, "Sukses Edit" salah: MsgBox "Data Obat tidak bisa di edit..",, "Periksa" Private Sub Form_Activate() cmdbaru.enabled = True cmdbaru.setfocus Private Sub Form_Load() Ketengah Me DaftarObat If Tab1.Tab = 1 Then Tab1.Tab = 0 Private Sub Form_OLESetData(Data As DataObject, DataFormat As Integer) On Error Resume Next Do Until Me.Top <= -5000 DoEvents Me.Move Me.Left, Me.Top - 10 DoEvents Loop Unload Me Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) On Error Resume Next Do Until Me.Top <= -5000 DoEvents Me.Move Me.Left, Me.Top - 10 DoEvents Loop Unload Me Private Sub Form_Unload(Cancel As Integer) If Not vtrans Then Unload Me Set TObat = Nothing Set frmobat = Nothing Kata = MsgBox("Data obat belum di simpan..." & vbcrlf & _

"Data obat mau di simpan...", vbinformation + vbyesno, "Obat Belum di Simpan") If Kata = vbyes Then cmdsimpan.enabled = True cmdsimpan_click Set TObat = Nothing Set frmobat = Nothing Unload Me Set TObat = Nothing Set frmobat = Nothing Unload Me Private Sub Lv1_DblClick() With frmobat.txtkode = Lv1.SelectedItem.SubItems(1).txtNama = Lv1.SelectedItem.SubItems(2).txtJenis = Lv1.SelectedItem.SubItems(3).cmdHapus.Enabled = True.cmdEdit.Enabled = True.cmdBaru.Caption = "&Batal".Tab1.Tab = 0 Private Sub Tab1_Click(PreviousTab As Integer) If Tab1.Tab = 1 Then If Lv1.ListItems.Count = 0 Then MsgBox "DaftarObat masih kosong.." & vbcrlf & _ "Entry Data obat..." Tab1.Tab = 0 DaftarObat Sub DaftarObat() On Error GoTo salah 1 Kata = "Select * From [obat] Order By [kode Obat]" Set TObat = New ADODB.Recordset TObat.Open Kata, TMedis, adopenstatic, adlockreadonly Lv1.ListItems.Clear If Not TObat.EOF Then TObat.MoveFirst i = 1 While Not TObat.EOF Set Vbutir = Lv1.ListItems.Add(,, i & ".") Vbutir.SubItems(1) = TObat![Kode Obat]

Vbutir.SubItems(2) = TObat![Nama Obat] Vbutir.SubItems(3) = TObat![jenis] TObat.MoveNext i = i + 1 Wend TObat.Close Set TObat = Nothing salah: MsgBox Err.Description Private Sub txtkode_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtkode <> "" Then If Len(txtKode) <> 6 Then MsgBox "Kode Obat harus di isi sebayak 6 digit..", vbcritical, "System error" Fokus txtkode 1 Kata = "select * from obat where [kode Obat]='" & txtkode.text & "'" Set TObat = New ADODB.Recordset TObat.Open Kata, TMedis, adopendynamic, adlockpessimistic If TObat.EOF Then Fokus txtnama TObat.Close With TObat txtnama =![Nama Obat] txtjenis =![jenis] NotAktif cmdedit.enabled = True cmdcari.enabled = False cmdhapus.enabled = True cmdbaru.caption = "&Batal" TObat.Close Set TObat = Nothing Private Sub txtnama_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtnama <> "" Then Fokus txtjenis

Private Sub txtnama_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Private Sub txtjenis_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtjenis <> "" Then cmdsimpan.enabled = True cmdsimpan.setfocus vtrans = True Private Sub txtjenis_keypress(keyascii As Integer) If Not (KeyAscii >= Asc("a") & Chr(13) _ And KeyAscii <= Asc("z") & Chr(13) _ Or (KeyAscii >= Asc("A") & Chr(13) _ And KeyAscii <= Asc("Z") & Chr(13) _ Or KeyAscii = vbkeyback _ Or KeyAscii = vbkeydelete _ Or KeyAscii = vbkeyspace)) Then Beep KeyAscii = 0 Sub DaftarCari() With TCari txtkode =![Kode Obat] txtnama =![Nama Obat] txtjenis =![jenis] 5. Menu Input Pemeriksaan Private Sub Auto() Dim Hitung As Byte Dim tanggal, Tahun As Date tanggal = Format(Now, "mmyy") Set TRawat = New ADODB.Recordset TRawat.Open "Select * From medis ", TMedis, adopenstatic, adlockreadonly With TRawat

If.RecordCount = 0 Then Urutan = "000" & "001".MoveLast If Val(Left(.Fields("No Medis"), 5)) <> "000" Then Urutan = "00" & "001" Hitung = Val(Right(.Fields("No Medis"), 6)) + 1 Urutan = "00" & Right("000" & Hitung, 6) txtnomor.text = Urutan Private Sub cmbdokter_click() If cmbdokter.text <> "" Then 1 Kata = "Select * from dokter where [Kode dokter]='" & cmbdokter.text & "'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Kode dokter = & " & cmbdokter.text & " tidak terdaftar...", vbinformation cmbdokter.setfocus With TDokter txtnamadokter =![Nama dokter] TDokter.Close Set TDokter = Nothing Fokus txtdiagnosa Private Sub cmbdokter_keypress(keyascii As Integer) If KeyAscii = 13 Then If cmbdokter.text <> "" Then 1 Kata = "Select * from dokter where [Kode dokter]='" & cmbdokter.text & "'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Kode dokter = & " & cmbdokter.text & " tidak terdaftar...", vbinformation cmbdokter.setfocus

With TDokter txtnamadokter =![Nama dokter] TDokter.Close Set TDokter = Nothing Fokus txtkdoe Private Sub cmbpasien_click() If cmbpasien.text <> "" Then 1 Kata = "Select * from Pasien where [Kode pasien]='" & cmbpasien.text & "'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then TPasien.Close Set TPasien = Nothing MsgBox "Kode pasien = & " & cmbpasien.text & " tidak terdaftar...", vbinformation cmbpasien.setfocus With TPasien txtnamapasien =![Nama pasien] TPasien.Close Set TPasien = Nothing DaftarDokter If cmbpasien.listcount = 0 Then MsgBox "Data Dokter masih kosong..,," & vbcrlf & _ "Coba periksa kembali...", vbcritical Unload Me r = SendMessageLong(cmbDokter.hwnd, CB_SHOWDROPDOWN, True, 0) cmbdokter.enabled = True Frame1.Enabled = False Frame2.Enabled = True Private Sub cmbpasien_keypress(keyascii As Integer) If KeyAscii = 13 Then If cmbpasien.text <> "" Then 1 Kata = "Select * from Pasien where [Kode pasien]='" & cmbpasien.text & "'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then TPasien.Close

Set TPasien = Nothing MsgBox "Kode pasien = & " & cmbpasien.text & " tidak terdaftar...", vbinformation cmbpasien.setfocus With TPasien txtnamapasien =![Nama pasien] TPasien.Close Set TPasien = Nothing DaftarDokter If cmbpasien.listcount = 0 Then MsgBox "Data Dokter masih kosong..,," & vbcrlf & _ "Coba periksa kembali...", vbcritical Unload Me r = SendMessageLong(cmbDokter.hwnd, CB_SHOWDROPDOWN, True, 0) cmbdokter.enabled = True Private Sub cmdhapusdaftar_click() If Lv1.ListItems.Count > 0 Then Lv1.ListItems.Remove Lv1.SelectedItem.Index For i = 1 To Lv1.ListItems.Count Lv1.ListItems(i).text = i & "." Next i Private Sub Form_Load() Ketengah Me Private Sub cmdbaru_click() 1 If cmdbaru.caption = "&Baru" Then cmdbaru.caption = "&Batal" Auto txttanggal.enabled = True txttanggal.setfocus vedit = False Semula Private Sub cmdsimpan_click() 1 If Not vedit Then Simpan Edit

Semula Private Sub cmdtutup_click() Unload Me Sub Semula() Bersih vedit = False vtrans = False cmdsimpan.enabled = False cmdbaru.caption = "&Baru" NotAktif cmdbaru.setfocus Lv1.ListItems.Clear Sub Bersih() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.text = "" If TypeOf Control Is ComboBox Then Control.text = "" Next Control Sub NotAktif() Dim Control For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Enabled = False If TypeOf Control Is ComboBox Then Control.Enabled = False Next Control Private Sub Form_Activate() cmdbaru.enabled = True cmdbaru.setfocus Timer1.Enabled = True Sub DaftarDokter() 1 Kata = "Select * from Dokter Order By [Kode Dokter]" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic cmbdokter.clear If Not TDokter.EOF Then TDokter.MoveFirst While Not TDokter.EOF cmbdokter.additem TDokter![Kode Dokter] TDokter.MoveNext Wend

TDokter.Close Set TDokter = Nothing Sub DaftarPasien() 1 Kata = "Select * from Pasien Order By [Kode Pasien]" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic cmbpasien.clear If Not TPasien.EOF Then TPasien.MoveFirst While Not TPasien.EOF cmbpasien.additem TPasien![Kode Pasien] TPasien.MoveNext Wend TPasien.Close Set TPasien = Nothing Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Do Until Me.Top <= -5000 DoEvents Me.Move Me.Left, Me.Top - 10 DoEvents Loop Unload Me Private Sub lstobat_click() On Error GoTo salah Set TCari = New ADODB.Recordset Kata = "Select * from obat where [Kode Obat]='" & Left(lstObat, 5) & "'" TCari.Open Kata, TMedis, adopendynamic, adlockpessimistic If TCari.RecordCount = 0 Then TCari.Close Set TCari = Nothing With TCari txtkode =![Kode Obat] txtnamaobat =![Nama Obat] txtjenis =![jenis] For i = 1 To Lv1.ListItems.Count If txtkode.text = Lv1.ListItems(i).SubItems(5) Then MsgBox "Data Obat Sudah Ada...", vbexclamation, "Ooops..." txtkode = "" Fokus txtkode txtnamaobat = "" txtjenis = "" txtjumlah = ""

Next Fokus txtjumlah TCari.Close Set TCari = Nothing salah: MsgBox "System Error, Please cek data obat", vbinformation, "data error" Private Sub Lv1_Click() If Not Lv1.ListItems.Count = 0 Then cmdhapusdaftar.enabled = True Private Sub Timer1_Timer() DataObat Private Sub txtdiagnosa_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtdiagnosa <> "" Then Fokus txtketerangan Private Sub txtjumlah_keydown(keycode As Integer, Shift As Integer) If KeyCode = 13 Then If txtjumlah <> "" Then If vedit = False Then 1 Set Vbutir = Lv1.ListItems.Add(,, Lv1.ListItems.Count + 1 & ".") Vbutir.SubItems(1) = cmbdokter.text Vbutir.SubItems(2) = txtnamadokter.text Vbutir.SubItems(3) = txtdiagnosa.text Vbutir.SubItems(4) = txtketerangan.text Vbutir.SubItems(5) = txtkode.text Vbutir.SubItems(6) = txtnamaobat Vbutir.SubItems(7) = txtjenis Vbutir.SubItems(8) = txtjumlah vtrans = True Pesan = MsgBox("Masih Ada data Obat Yang Mau Di Input...", vbquestion + vbyesno, "Informasi..") If Pesan = vbyes Then txtkode = "" Fokus txtkode txtnamaobat = "" txtjenis = "" txtjumlah = ""

cmdsimpan.enabled = True cmdsimpan.setfocus vtrans = True If Lv1.ListItems.Count > 0 Then Lv1.ListItems.Remove Lv1.SelectedItem.Index For i = 1 To Lv1.ListItems.Count Lv1.ListItems(i).text = i & "." Next i txtsubtotal.text = Val(Int(txtHarga)) * Val(Int(txtJumlah)) Set Vbutir = Lv1.ListItems.Add(,, Lv1.ListItems.Count + 1 & ".") Vbutir.SubItems(1) = cmbdokter.text Vbutir.SubItems(2) = txtnamadokter.text Vbutir.SubItems(3) = txtdiagnosa.text Vbutir.SubItems(4) = txtketerangan.text Vbutir.SubItems(5) = txtkode.text Vbutir.SubItems(6) = txtnamaobat Vbutir.SubItems(7) = txtjenis Vbutir.SubItems(8) = txtjumlah cmdsimpan.enabled = True cmdsimpan.setfocus Private Sub txtketerangan_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtketerangan <> "" Then If Not vedit Then Fokus txtkode lstobat.enabled = True Frame2.Enabled = False Fokus txtjumlah lstobat.enabled = True Frame2.Enabled = False Private Sub txttanggal_keypress(keyascii As Integer) If KeyAscii = 13 Then DaftarPasien If cmbpasien.listcount = 0 Then MsgBox "Data Pasien masih kosong..,," & vbcrlf & _ "Coba periksa kembali...", vbcritical Unload Me r = SendMessageLong(cmbPasien.hwnd, CB_SHOWDROPDOWN, True, 0) cmbpasien.enabled = True Frame1.Enabled = True

Sub DataObat() On Error GoTo Obatkosong Set TObat = New ADODB.Recordset TObat.Open "Select * from Obat", TMedis, adopendynamic, adlockpessimistic If TObat.RecordCount = 0 Then TObat.Close Set TObat = Nothing MsgBox "data Obat masih kosong...", vbinformation Timer1.Enabled = False Unload Me lstobat.clear Timer1.Enabled = False Do Until TObat.EOF lstobat.additem TObat![Kode Obat] & vbtab & TObat![Nama Obat] TObat.MoveNext Loop TObat.Close Set TObat = Nothing Obatkosong: MsgBox Err.Description Sub Simpan() 'On Error GoTo salah 1 TMedis.BeginTrans ' For i = 1 To Lv1.ListItems.Count TMedis.Execute "Insert Into Master values ('" & txtnomor.text & "'," & _ "'" & txttanggal.text & "','" & cmbpasien.text & "','" & cmbdokter.text & "'," & _ "'" & txtdiagnosa.text & "','" & txtketerangan.text & "')" 'Next i TMedis.CommitTrans TMedis.BeginTrans For i = 1 To Lv1.ListItems.Count TMedis.Execute "Insert Into Medis values ('" & txtnomor.text & "'," & _ "'" & Lv1.ListItems(i).SubItems(5) & "','" & Val(Lv1.ListItems(i).SubItems(8)) & "')" Next i TMedis.CommitTrans Sub Edit() On Error GoTo salah 1 TMedis.BeginTrans For i = 1 To Lv1.ListItems.Count TMedis.Execute "Update Medis Set Diagnosa='" & Lv1.ListItems(i).SubItems(3) & "',Keterangan='" & _

Lv1.ListItems(i).SubItems(4) & "' Where [No Medis]='" & txtnomor.text & "'" Next i TMedis.BeginTrans For i = 1 To Lv1.ListItems.Count TMedis.Execute "Update Dosis set resep ='" & Lv1.ListItems(i).SubItems(8) & "' Where [No medis]='" & txtnomor.text & "'" Next i TMedis.CommitTrans salah: MsgBox "Data tidak bisa di edit, ada kesalahan..", vbinformation 6. Menu Laporan Pasien Private Sub cmblaporan_click() If Len(cmbLaporan) Then Select Case cmblaporan.text Case "Kode Pasien" LblStatus.Caption = "Kode Pasien:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "Nama Pasien" LblStatus.Caption = "Nama Pasien:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "Kota" LblStatus.Caption = "Kota Pasien:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "All" LblStatus.Caption = "All Laporan:" cmdcetak.enabled = True cmdcetak.setfocus txtlaporan.enabled = False cmdtutup.caption = "&Batal" End Select Private Sub cmblaporan_keypress(keyascii As Integer) KeyAscii = AutoComplete(cmbLaporan, KeyAscii, True, Ubah) Private Sub cmdcetak_click() 'On Error GoTo Cetak 1 Select Case cmblaporan.text Case "Kode Pasien" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Pasien.rpt"

.DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "irul".selectionformula = "{Pasien.Kode Pasien}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== ======= Case "Nama Pasien" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Pasien.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "irul".selectionformula = "{Pasien.Nama Pasien}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== =================== Case "Kota" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Pasien.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "irul".selectionformula = "{Pasien.Asal Kota}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True

.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== =============== Case "All" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Pasien.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "irul".windowminbutton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 End Select cmdcetak.enabled = False '=================================================================== ' 'Cetak: ' MsgBox Err.Description & Err.Number Private Sub cmdtutup_click() Select Case cmdtutup.caption Case "&Tutup" Set frmlappasien = Nothing Unload Me Case "&Batal" txtlaporan = "" cmblaporan.text = "" LblStatus.Caption = "" cmdtutup.caption = "&Tutup" cmdcetak.enabled = False End Select Private Sub Form_Load() Ketengah Me Private Sub txtlaporan_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtlaporan <> "" Then Select Case cmblaporan.text Case "Kode Pasien" DataKode

Case "Nama Pasien" DataNama Case "Kota" DataKota End Select Sub DataKode() On Error GoTo salah 1 Kata = "Select * from pasien Where [Kode Pasien]='" & txtlaporan.text & "'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then TPasien.Close Set TPasien = Nothing MsgBox "Kode pasien = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TPasien.Close Set TPasien = Nothing salah: MsgBox Err.Description & Err.Number Sub DataNama() On Error GoTo salah 1 Kata = "Select * from pasien Where [Nama Pasien] like '%" & txtlaporan.text & "%'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then TPasien.Close Set TPasien = Nothing MsgBox "Nama pasien = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TPasien.Close

Set TPasien = Nothing salah: MsgBox Err.Description & Err.Number Sub DataKota() On Error GoTo salah 1 Kata = "Select * from pasien Where [asal KOta] like '%" & txtlaporan.text & "%'" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic, adlockpessimistic If TPasien.EOF Then TPasien.Close Set TPasien = Nothing MsgBox "Kota pasien = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TPasien.Close Set TPasien = Nothing salah: MsgBox Err.Description & Err.Number 7. Menu Laporan Dokter Private Sub cmblaporan_click() If Len(cmbLaporan) Then Select Case cmblaporan.text Case "Kode Dokter" LblStatus.Caption = "Kode Dokter:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "Nama Dokter" LblStatus.Caption = "Nama Dokter:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "Kota" LblStatus.Caption = "Kota Dokter:" Fokus txtlaporan cmdtutup.caption = "&Batal" Case "Spesialis" LblStatus.Caption = "Spesialis:" Fokus txtlaporan cmdtutup.caption = "&Batal"

Case "All" LblStatus.Caption = "All Laporan:" cmdcetak.enabled = True cmdcetak.setfocus txtlaporan.enabled = False cmdtutup.caption = "&Batal" End Select Private Sub cmblaporan_keypress(keyascii As Integer) KeyAscii = AutoComplete(cmbLaporan, KeyAscii, True, Ubah) Private Sub cmdcetak_click() 'On Error GoTo Cetak 1 Select Case cmblaporan.text Case "Kode Dokter" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Dokter.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "irul".selectionformula = "{Dokter.Kode Dokter}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== ===================== Case "Nama Dokter" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Dokter.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "candra".selectionformula = "{Dokter.Nama Dokter}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True

.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== =================== Case "Kota" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Dokter.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "candra".selectionformula = "{Dokter.Kota}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== =============== Case "Spesialis" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap All Dokter.rpt".DataFiles(0) = App.Path & "\medis.mdb".password = Chr(10) & "candra".selectionformula = "{Dokter.Spesialis}='" & txtlaporan.text & "'".Formulas(0) = "Ket='" & cmblaporan.text & vbtab & txtlaporan.text & " '".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 '==================================================================== =============== Case "All" With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Dokter.rpt"

.Password = Chr(10) & "candra".datafiles(0) = App.Path & "\Medis.mdb".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 End Select cmdcetak.enabled = False '=================================================================== ' 'Cetak: ' MsgBox Err.Description & Err.Number Private Sub cmdtutup_click() Select Case cmdtutup.caption Case "&Tutup" Set frmlapdokter = Nothing Unload Me Case "&Batal" txtlaporan = "" cmblaporan.text = "" LblStatus.Caption = "" cmdtutup.caption = "&Tutup" cmdcetak.enabled = False End Select Private Sub Form_Load() Ketengah Me Private Sub txtlaporan_keypress(keyascii As Integer) If KeyAscii = 13 Then If txtlaporan <> "" Then Select Case cmblaporan.text Case "Kode Dokter" DataKode Case "Nama Dokter" DataNama Case "Kota" DataKota Case "Spesialis" DataSpesialis End Select Sub DataKode()

On Error GoTo salah 1 Kata = "Select * from Dokter Where [Kode Dokter]='" & txtlaporan.text & "'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Kode Dokter = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TDokter.Close Set TDokter = Nothing salah: MsgBox Err.Description & Err.Number Sub DataNama() On Error GoTo salah 1 Kata = "Select * from Dokter Where [Nama Dokter] like '%" & txtlaporan.text & "%'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Nama Dokter = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TDokter.Close Set TDokter = Nothing salah: MsgBox Err.Description & Err.Number Sub DataKota()

On Error GoTo salah 1 Kata = "Select * from Dokter Where [KOta] like '%" & txtlaporan.text & "%'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Kota Dokter = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TDokter.Close Set TDokter = Nothing salah: MsgBox Err.Description & Err.Number Sub DataSpesialis() On Error GoTo salah 1 Kata = "Select * from Dokter Where [Spesialis] like '%" & txtlaporan.text & "%'" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic, adlockpessimistic If TDokter.EOF Then TDokter.Close Set TDokter = Nothing MsgBox "Dokter Spesialis = " & txtlaporan & " tidak terdaftar...", vbinformation Fokus txtlaporan cmdcetak.enabled = True cmdcetak.setfocus TDokter.Close Set TDokter = Nothing salah: MsgBox Err.Description & Err.Number 8. Menu Laporan Medis

Private Sub cmbdokter_click() If cmbdokter <> "" Then cmdcetak.enabled = True cmdcetak.setfocus Private Sub cmbmedis_click() If cmbmedis <> "" Then cmdcetak.enabled = True cmdcetak.setfocus Private Sub cmbpasien_click() If cmbpasien <> "" Then cmdcetak.enabled = True cmdcetak.setfocus Private Sub cmdall_click() 1 With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Periksa.rpt".Password = Chr(10) & "irul".datafiles(0) = App.Path & "\Medis.mdb" '.SelectionFormula = "{QMedis.Kode Pasien}='" & cmbpesien.text & "'".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 cmdcetak.enabled = False Private Sub cmdcetak_click() If cmbpasien.enabled = True Then 1 With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Periksa.rpt".Password = Chr(10) & "irul".datafiles(0) = App.Path & "\Medis.mdb".SelectionFormula = "{QMedis.kode Pasien}='" & cmbpasien.text & "'".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True

.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 cmdcetak.enabled = False If cmbmedis.enabled = True And cmbpasien.enabled = False Then 1 With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Periksa.rpt".Password = Chr(10) & "irul".datafiles(0) = App.Path & "\Medis.mdb".SelectionFormula = "{QMedis.No Medis}='" & cmbmedis.text & "'".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 cmdcetak.enabled = False If cmbpasien.enabled = False And cmbmedis.enabled = False Then 1 With CrtLaporan.Reset.ReportFileName = App.Path & "\Laporan\Lap Periksa.rpt".Password = Chr(10) & "irul".datafiles(0) = App.Path & "\Medis.mdb".SelectionFormula = "{QMedis.kode Dokter}='" & cmbdokter.text & "'".WindowMinButton = False.WindowShowCancelBtn = True.WindowShowCloseBtn = True.WindowShowPrintBtn = True.WindowShowPrintSetupBtn = True.WindowParentHandle = frmutama.hwnd.windowstate = crptmaximized.action = 1 cmdcetak.enabled = False Private Sub cmdtutup_click() Select Case cmdtutup.caption Case "&Tutup" Unload Me

Case "&Batal" cmdtutup.caption = "&Tutup" cmdcetak.enabled = False cmdall.enabled = True End Select Private Sub Form_Load() Ketengah Me 'cmdtutup.setfocus Sub DaftarPasien() 1 Kata = "Select Distinct [Kode Pasien] from QMedis Order By [Kode Pasien]" Set TPasien = New ADODB.Recordset TPasien.Open Kata, TMedis, adopendynamic cmbpasien.clear If Not TPasien.EOF Then TPasien.MoveFirst While Not TPasien.EOF cmbpasien.additem TPasien![Kode Pasien] TPasien.MoveNext Wend TPasien.Close Set TPasien = Nothing Sub DaftarDokter() 1 Kata = "Select Distinct [Kode Dokter] from QMedis Order By [Kode Dokter]" Set TDokter = New ADODB.Recordset TDokter.Open Kata, TMedis, adopendynamic cmbdokter.clear If Not TDokter.EOF Then TDokter.MoveFirst While Not TDokter.EOF cmbdokter.additem TDokter![Kode Dokter] TDokter.MoveNext Wend TDokter.Close Set TDokter = Nothing Sub DaftarMedis() 1 Kata = "Select Distinct [no Medis] from QMedis Order By [No medis]" Set TCari = New ADODB.Recordset TCari.Open Kata, TMedis, adopendynamic cmbmedis.clear If Not TCari.EOF Then TCari.MoveFirst While Not TCari.EOF

cmbmedis.additem TCari![No Medis] TCari.MoveNext Wend TCari.Close Set TCari = Nothing Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 20 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 50 Private Sub Option1_Click() cmbpasien.enabled = True DaftarPasien cmbdokter.enabled = False cmbmedis.enabled = False Private Sub Option2_Click() cmbpasien.enabled = False DaftarMedis cmbdokter.enabled = False cmbmedis.enabled = True cmdall.enabled = False Private Sub Option3_Click() cmbpasien.enabled = False DaftarDokter cmbdokter.enabled = True cmbmedis.enabled = False cmdall.enabled = False 9. Menu Laporan Kartu Private Sub cmbpilih_click() If Len(cmbPilih) Then 1 Select Case cmbpilih.text Case "Nama Pasien" LblJudul.Caption = "Nama Pasien" Fokus txtcari cmdcetak.enabled = False cmdtutup.caption = "&Batal" Case "Kode Pasien" LblJudul.Caption = "&Kode Pasien" Fokus txtcari cmdcetak.enabled = False cmdtutup.caption = "&Batal" End Select