LISTING PROGRAM. Form Splash

Similar documents
LAMPIRAN 1. Kode Program Splash Screen

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

LISTING PROGRAM. 1. Form Menu Utama. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN LIST PROGRAM

LAMPIRAN : LISTING PROGRAM

Tutorial, Source code, Request Program Visual Basic

LISTING PROGRAM. 1. Menu Utama

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub

LAMPIRAN A LISTING PROGRAM. Universitas Sumatera Utara

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

Lampiran A : Listing Program

LAMPIRAN. Universitas Sumatera Utara

1. Menu Utama. Private Sub abt_click() frmabout.show End Sub. Private Sub dafabsenhar_click() frmdafabsensihar.show End Sub

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub

SURAT KETERANGAN Hasil Uji Program Tugas Akhir

22. VB Programming Fundamentals Data Access with Data Objects

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

LAMPIRAN A : LISTING PROGRAM

ONLINE RAILWAY RESERVATION SYSTEM

Remainder Cordial Labeling of Graphs

Rooftop Industries Pvt. Ltd.

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

Nilai Input (Peringkat Alternatif Fuzzy dan Crisp Terhadap Kriteria)

Contents Introduction Getting Started Visual Basic Form Configuration Entering the VB Code

PROGRAM BASCOM AVR. ' inisialisasi '

ต วอย างการสร างฟอร ม เมน การใช งาน

Financial Functions (all with subtypes: Normal, Stairs, Points, Height, Hollow, Colors, Marks, No Border except where indicated):

Universitas Sumatera Utara

Private Sub Command2_Click() End End Sub. Private Sub Command3_Click() frmchangepassword.show End Sub. Private Sub Form_Activate() check_db End Sub

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function:

Password Protect an Access Database

LAMPIRAN. Universitas Sumatera Utara

Chapter 1. Block Diagram. Text .. 1

LISTING PROGRAM. 1. Menu Utama

Understanding the MsgBox command in Visual Basic

PROGRAM 1: SIMPLE CALCULATOR

Visual Basic , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm.

Visual Basic ,

LISTING PROGRAM. PrivateSub KeluarToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles KeluarToolStripMenuItem.Click Close() EndSub

Definition, Investigation and Analysis

Visual Basic 6 Lecture 7. The List Box:

Universitas Sumatera Utara

LAMPIRAN A : LISTING PROGRAM


Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

Visitor Management System

NE1R EAST UNIVERSITY, FA-CULTYOF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING COM400 GRADUATION PROJECT LIBRARY AND BOOKSTORE AND DATABASE

MICROSOFT EXCEL. Membina Hamparan Elektronik Fungsi Hamparan Elektronik

Revisions: jee Initial jee SW Version 1.1 now includes the leave type Other

Programming Concepts and Skills. Arrays continued and Functions

Programming with visual Basic:

LAMPIRAN A: Listing Program

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL

Information Hiding In Images Using Randomly Selected Points

Manual Vba Access 2010 Recordset Findfirst

Visual Basic ,

CARA-CARA UNTUK MEMBUAT POSTER MELALUI PERISIAN PHOTOSHOP. Untuk membuat poster sediakan beberapa bahan seperti berikut:

Else. End If End Sub End Class. PDF created with pdffactory trial version

LAMPIRAN A PROGRAM ADMINISTRASI

LISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal

Customizable Progress Bar for VB6 Based on graphics in picture boxes dec 23, 2017 by Gerard Hageman

Relational Operators. > greater than < less than >= greater than or equal to <= less than or equal to <> not equal to = equal to

Stamps In the Lab Part 2

LAMPIRAN A: LISTING PROGRAM

2Practicals Visual Basic 6.0


The design and implementation of UML-based students information management system

The Control Properties

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

Function: function procedures and sub procedures share the same characteristics, with

MANAGE COURSE RESOURCES LABEL TEXT PAGE URL BOOK FILE FOLDER IMS CONTENT PACKAGE

LAMPIRAN. Universitas Sumatera Utara

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice

Mr.Khaled Anwar ( )

UJIAN AKHIR SEMESTER TEKNIK INFORMATIKA SEKOLAH TINGGI TEKNOLOGI DUTA BANGSA

EMPLOYEE PAYROLL SYSTEM

LAMPIRAN A PROGRAM FLOWSTONE

PERKHIDMATAN KREDIT DAN PERBANKAN PROSEDUR UNIT KOMPUTER. Proses Backup ( Windows) BPKP/KlOK-118 Bilangan Semakan : Q Tarikh :

Generated by Foxit PDF Creator Foxit Software For evaluation only. ภาคผนวก ก

PANDUAN PENGGUNA (PENSYARAH)

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

NOTES: Procedures (module 15)

OUR company has recognized that forms design is

JABATAN KIMIA Kategori Arahan Kerja

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

Model. November 2009 Pages in total: 52 XRKT2*RTZ001D/E

ISI KANDUNGAN. Tarikh akhir kemaskini: 9 November 2016 Hakcipta Pusat Komputer, UTeM ms 2

REGISTRATION GUIDE MCIS CUSTOMER PORTAL. Page 1

Pengenalan Sistem Maklumat Dalam Pendidikan

LAMPIRAN LISTING PROGRAM

Introduction to Microsoft Message Queuing Services (MSMQ)

Kartu Bimbingan Tugas Akhir Mahasiswa

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

Panduan Menggunakan Autoresponder FreeAutobot.com

Advanced Visual Basic

Exercise 6. Controlling of a bipolar stepper motor with the help of eprodas SCI module and program language Visual Basic

Cara Login Ke CPanel Hosting.

Transcription:

LISTING PROGRAM Form Splash Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblproductname.caption = App.Title lblcopyright.caption = App.LegalCopyright lblcompany.caption = App.CompanyName ImgSplash.Picture = LoadPicture(App.Path & "\img\splash.jpg") Private Sub Frame1_Click() bar.value = bar.value + 4 Screen.MousePointer = vbhourglass If bar.value = 8 Then lbbar.caption = "Loading..." ElseIf bar.value = 28 Then lbbar.caption = "Waiting database..." ElseIf bar.value = 40 Then lbbar.caption = "Initializing..." ElseIf bar.value = 68 Then lbbar.caption = "Please wait..." ElseIf bar.value = 100 Then If bar.value = 100 Then If Timer1.Interval >= 1 Then Screen.MousePointer = vbdefault main_menu.show Form Main Menu Private Sub cmdadmin_click() Admin.Show Private Sub cmdcari_click() CariData.Show Private Sub cmdgaleribahan_click() galeribahan.show Private Sub cmdindeks_click() Daftar.Show

Private Sub cmdout_click() End Private Sub cmdsimpan_click() inputobat.show Private Sub Form_Load() Me.Width = 10 Me.Width = Me.Width + 100 If Me.Width >= 9360 Then Timer1.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Left = Me.Left + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Left > Screen.Width Private Sub Timer3_Timer() '========= setting waktu ========== lbljam.caption = Format(Now, "hh:mm:ss") lbltanggal.caption = Format(Date, "dd mmm yyyy") Form Daftar Obat Private Sub cmdedit_click() namacross = txtid.text editdata.show Private Sub cmdhapus_click() Dim strdelete As String tanya = MsgBox("Apakah Anda yakin akan menghapus data dengan nama : " & txtid.text & "?", vbquestion + vbyesno, "Konfirmasi hapus") If tanya = vbyes Then

strdelete = "Delete from tblobat Where namaobat = '" & txtid.text & "'" adokonek.execute strdelete PopData lblnama.caption = "" lblindikasi.caption = "" lblbahan.caption = "" lblcara.caption = "" lblpakai.caption = "" lblkat.caption = "" imgobat.picture = LoadPicture() MsgBox "Data Berhasil dihapus! ", vbexclamation, "Alert" Else Private Sub cmdkembali_click() main_menu.show Private Sub cmdtambah_click() inputobat.show Private Sub Form_Load() InitConnection PopData Me.Width = 10 Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open Private Sub PopData() Dim lstx As ListItem Dim strsql As String Dim intcounter As Integer strsql = "select * from tblobat order by ID" Set rs = New ADODB.Recordset rs.open strsql, adokonek, 3, 1 listherbal.listitems.clear With rs If.RecordCount > 0 Then.MoveFirst intcounter = 1 While Not.EOF

Set lstx = listherbal.listitems.add(,, intcounter) lstx.listsubitems.add = Trim(!namaObat) lstx.listsubitems.add = Trim(!indikasi) lstx.listsubitems.add = Trim(!bahan) lstx.listsubitems.add = Trim(!caraBuat) lstx.listsubitems.add = Trim(!caraPakai) lstx.listsubitems.add = Trim(!kategori) lstx.listsubitems.add = Trim(!Path) lstx.listsubitems.add = Trim(!ID) intcounter = intcounter + 1.MoveNext Wend End With Private Sub listherbal_itemclick(byval Item As MSComctlLib.ListItem) Dim intselitem As Integer intselitem = Item txtid = listherbal.listitems(intselitem).listsubitems(1).text lblnama.caption = listherbal.listitems(intselitem).listsubitems(1).text lblindikasi.caption = listherbal.listitems(intselitem).listsubitems(2).text lblbahan.caption = listherbal.listitems(intselitem).listsubitems(3).text lblcara.caption = listherbal.listitems(intselitem).listsubitems(4).text lblpakai.caption = listherbal.listitems(intselitem).listsubitems(5).text lblkat.caption = listherbal.listitems(intselitem).listsubitems(6).text imgobat.picture = LoadPicture(App.Path & listherbal.listitems(intselitem).listsubitems(7).text) Me.Width = Me.Width + 100 If Me.Width >= 14895 Then Timer1.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500

Input Obat Dim alamat As String Private Sub mnuexit_click() Private Sub cmdbrowse_click() cdi.showopen imgobat.picture = LoadPicture(cdi.FileName) alamat = "\gambar\gbrobat\" & txtnamaobat.text & ".jpg" Private Sub cmdhome_click() main_menu.show Private Sub cmdsave_click() Dim kat As String Dim strsql As String If obatluar.value = True Then kat = "Obat Luar" ElseIf obatdalam.value = True Then kat = "Obat Dalam" If txtnamaobat.text = "" Then MsgBox "Masukkan Nama Obat ", vbexclamation, "Alert" txtnamaobat.setfocus If txtindikasi.text = "" Then MsgBox "Masukkan Indikasi obat ", vbexclamation, "Alert" txtindikasi.setfocus If txtbahan.text = "" Then MsgBox "Masukkan Bahan Obat ", vbexclamation, "Alert" If obatluar.value = False And obatdalam.value = False Then MsgBox "Kategori Obat Belum dipilih!" If txtcara.text = "" Then MsgBox "Masukkan Cara membuat obat ", vbexclamation, "Alert" If txtpakai.text = "" Then

MsgBox "Masukkan Cara Pakai Obat ", vbexclamation, "Alert" 'strsql = "Insert into tblobat(namaobat,indikasi,bahan,carabuat,carapakai,kategori,path)valu es('" & SQLSafe(txtNamaObat.Text) & "','" & SQLSafe(txtIndikasi.Text) & "','" & SQLSafe(txtBahan.Text) & "','" & SQLSafe(txtCara.Text) & "','" & SQLSafe(txtPakai.Text) & "','" & SQLSafe(kat) & "','" & SQLSafe(alamat) & "')" 'adokonek.execute strsql Set rs = New ADODB.Recordset rs.open "Select * from tblobat", adokonek, adopenkeyset, adlockoptimistic, adcmdtext rs.addnew rs!namaobat = txtnamaobat.text rs!indikasi = txtindikasi.text rs!bahan = txtbahan.text rs!carabuat = txtcara.text rs!carapakai = txtpakai.text rs!kategori = kat rs!path = alamat rs.update MsgBox "Data dengan nama " & txtnamaobat.text & " Berhasil disimpan! " '------ simpan gambar ke folder ------------ SavePicture imgobat.picture, App.Path & "\gambar\gbrobat\" & txtnamaobat.text & ".jpg" txtnamaobat.text = "" txtindikasi.text = "" txtbahan.text = "" txtcara.text = "" txtpakai.text = "" kat = "" obatdalam.value = False obatluar.value = False alamat = "" imgobat.picture = LoadPicture(alamat) txtnamaobat.setfocus Daftar.Show Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open

Private Sub Form_Load() InitConnection Me.Width = 10 '========= setting waktu ========== lbljam.caption = Format(Now, "hh:mm:ss") lbltanggal.caption = Format(Date, "dd mmm yyyy") Private Sub Timer2_Timer() Me.Width = Me.Width + 100 If Me.Width >= 14895 Then Timer2.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500 Input Bahan Dim alamat As String Private Sub cmdbrowse_click() cdi.showopen imgbahan.picture = LoadPicture(cdi.FileName) alamat = "\gambar\gbrbahan\" & txtnama.text & ".jpg" Private Sub cmdexit_click() Private Sub cmdreset_click() txtnama.text = Empty txtlatin.text = Empty cmbbentuk.text = "---- pilih bentuk ----" imgbahan.picture = LoadPicture() Private Sub cmdsimpan_click() If txtnama.text = "" Then MsgBox "Masukkan Nama Bahan ", vbexclamation, "Alert" txtnama.setfocus

If txtlatin.text = "" Then MsgBox "Masukkan Nama Latin ", vbexclamation, "Alert" txtlatin.setfocus If cmbbentuk.text = "---- pilih bentuk ----" Or cmbbentuk.text = "" Then MsgBox "Pilih Bentuk Bahan", vbexclamation, "Alert" Set rs = New ADODB.Recordset rs.open "Select * from tblbahan", adokonek, adopenkeyset, adlockoptimistic, adcmdtext rs.addnew rs!namabahan = txtnama.text rs!namalatin = txtlatin.text rs!bentuk = cmbbentuk.text rs!path = alamat rs.update SavePicture imgbahan.picture, App.Path & "\gambar\gbrbahan\" & txtnama.text & ".jpg" " MsgBox "Data dengan nama " & txtnama.text & " Berhasil disimpan! '------ simpan gambar ke folder ------------ cmdreset_click Private Sub Form_Load() InitConnection cmbbentuk.additem "Daun" cmbbentuk.additem "Batang" cmbbentuk.additem "akar" cmbbentuk.additem "Biji" cmbbentuk.additem "Buah" cmbbentuk.text = "---- pilih bentuk ----" Me.Width = 10 Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring

adokonek.open Me.Width = Me.Width + 100 If Me.Width >= 8340 Then Timer1.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500 Galeri Bahan Dim alamat As String Private Sub mnuexit_click() Private Sub cmdbrowse_click() cdi.showopen imgobat.picture = LoadPicture(cdi.FileName) alamat = "\gambar\gbrobat\" & txtnamaobat.text & ".jpg" Private Sub cmdhome_click() main_menu.show Private Sub cmdsave_click() Dim kat As String Dim strsql As String If obatluar.value = True Then kat = "Obat Luar" ElseIf obatdalam.value = True Then kat = "Obat Dalam" If txtnamaobat.text = "" Then MsgBox "Masukkan Nama Obat ", vbexclamation, "Alert" txtnamaobat.setfocus If txtindikasi.text = "" Then

MsgBox "Masukkan Indikasi obat ", vbexclamation, "Alert" txtindikasi.setfocus If txtbahan.text = "" Then MsgBox "Masukkan Bahan Obat ", vbexclamation, "Alert" If obatluar.value = False And obatdalam.value = False Then MsgBox "Kategori Obat Belum dipilih!" If txtcara.text = "" Then MsgBox "Masukkan Cara membuat obat ", vbexclamation, "Alert" If txtpakai.text = "" Then MsgBox "Masukkan Cara Pakai Obat ", vbexclamation, "Alert" 'strsql = "Insert into tblobat(namaobat,indikasi,bahan,carabuat,carapakai,kategori,path)valu es('" & SQLSafe(txtNamaObat.Text) & "','" & SQLSafe(txtIndikasi.Text) & "','" & SQLSafe(txtBahan.Text) & "','" & SQLSafe(txtCara.Text) & "','" & SQLSafe(txtPakai.Text) & "','" & SQLSafe(kat) & "','" & SQLSafe(alamat) & "')" 'adokonek.execute strsql Set rs = New ADODB.Recordset rs.open "Select * from tblobat", adokonek, adopenkeyset, adlockoptimistic, adcmdtext rs.addnew rs!namaobat = txtnamaobat.text rs!indikasi = txtindikasi.text rs!bahan = txtbahan.text rs!carabuat = txtcara.text rs!carapakai = txtpakai.text rs!kategori = kat rs!path = alamat rs.update MsgBox "Data dengan nama " & txtnamaobat.text & " Berhasil disimpan! " '------ simpan gambar ke folder ------------ SavePicture imgobat.picture, App.Path & "\gambar\gbrobat\" & txtnamaobat.text & ".jpg" txtnamaobat.text = "" txtindikasi.text = "" txtbahan.text = "" txtcara.text = ""

txtpakai.text = "" kat = "" obatdalam.value = False obatluar.value = False alamat = "" imgobat.picture = LoadPicture(alamat) txtnamaobat.setfocus Daftar.Show Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open Private Sub Form_Load() InitConnection Me.Width = 10 '========= setting waktu ========== lbljam.caption = Format(Now, "hh:mm:ss") lbltanggal.caption = Format(Date, "dd mmm yyyy") Private Sub Timer2_Timer() Me.Width = Me.Width + 100 If Me.Width >= 14895 Then Timer2.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500 Cari Data Private Sub cmdcari_click() PopData (txtindikasi)

Private Sub PopData(strTextSearch As String) Dim lstx As ListItem Dim strsql As String 'Dim rs As ADODB.Recordset Dim intcounter As Integer asc" strsql = "Select * from tblobat indikasi " & _ "where indikasi like '%" & strtextsearch & "%' order by ID Set rs = New ADODB.Recordset rs.open strsql, adokonek, 3, 1 listcari.listitems.clear With rs If.RecordCount > 0 Then.MoveFirst intcounter = 1 While Not.EOF Set lstx = listcari.listitems.add(,, intcounter) lstx.listsubitems.add = Trim(!namaObat) lstx.listsubitems.add = Trim(!indikasi) intcounter = intcounter + 1.MoveNext Wend End With Private Sub cmddetail_click() namacari = txtnamacari.text cmddetail.enabled = False detailobat.show Private Sub cmdkembali_click() main_menu.show Private Sub Form_Load() InitConnection Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open Private Sub listcari_dblclick()

cmddetail_click Private Sub listcari_itemclick(byval Item As MSComctlLib.ListItem) Dim intselitem As Integer intselitem = Item cmddetail.enabled = True txtnamacari.text = listcari.listitems(intselitem).listsubitems(1).text Me.Width = Me.Width + 100 If Me.Width >= 4260 Then Timer1.Enabled = False Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500 Edit Obat Dim alamatedit As String Private Sub cmdsimpan_click() Dim kat As String Dim rscmd2 As ADODB.Recordset Dim strupdate As String If obatluar.value = True Then kat = "Obat Luar" ElseIf obatdalam.value = True Then kat = "Obat Dalam" Dim rsedit As ADODB.Recordset Set rsedit = New ADODB.Recordset rsedit.open "SELECT * FROM tblobat WHERE namaobat = '" & lbljudul.caption & "'", adokonek, adopendynamic, adlockoptimistic, adcmdtext rsedit.update rsedit!namaobat = txtnamaobat.text rsedit!indikasi = txtindikasi.text rsedit!bahan = txtbahan.text rsedit!carabuat = txtcara.text rsedit!carapakai = txtpakai.text rsedit!kategori = kat

rsedit.update rsedit.close MsgBox "Data Berhasil diupdate!" Private Sub Command1_Click() Daftar.Show Private Sub Form_Load() InitConnection PopData (iddatauniversal) Me.Width = 10 Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open Private Sub PopData(idData As Integer) 'Dim lstx As ListItem Dim strsql As String 'Dim intcounter As Integer "'" strsql = "select * from tblobat where namaobat = '" & namacross & Set rs = New ADODB.Recordset rs.open strsql, adokonek, 3, 1 With rs If.RecordCount > 0 Then.MoveFirst 'intcounter = 1 While Not.EOF lbljudul.caption = Trim(!namaObat) txtnamaobat.text = Trim(!namaObat) txtindikasi.text = Trim(!indikasi) txtbahan.text = Trim(!bahan) txtcara.text = Trim(!caraBuat) txtpakai.text = Trim(!caraPakai) If (Trim(!kategori) = "Obat Luar") Then obatluar.value = True ElseIf (Trim(!kategori) = "Obat Dalam") Then obatdalam.value = True alamatedit = Trim(!Path)

.MoveNext Wend End With Me.Width = Me.Width + 100 If Me.Width >= 13995 Then Timer1.Enabled = False imgobat.picture = LoadPicture(App.Path & alamatedit) Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500 Detail Obat Dim alamatedit As String Private Sub InitConnection() Dim condbstring As String condbstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\dbherbal.mdb" Set adokonek = New ADODB.Connection adokonek.connectionstring = condbstring adokonek.open Private Sub cmdkembali_click() Private Sub Form_Load() InitConnection PopData (namacari) Me.Width = 10 Private Sub PopData(strTxtCari As String) 'Dim lstx As ListItem

Dim strsql As String 'Dim intcounter As Integer strsql = "select * from tblobat where namaobat = '" & strtxtcari & "'" Set rs = New ADODB.Recordset rs.open strsql, adokonek, 3, 1 With rs If.RecordCount > 0 Then.MoveFirst 'intcounter = 1 While Not.EOF.MoveNext Wend End With Me.Width = Me.Width + 100 If Me.Width >= 9165 Then Timer1.Enabled = False lbljudul.caption = Trim(!namaObat) lblnama.caption = Trim(!namaObat) lblindikasi.caption = Trim(!indikasi) lblbahan.caption = Trim(!bahan) lblcara.caption = Trim(!caraBuat) lblpakai.caption = Trim(!caraPakai) lblkat.caption = Trim(!kategori) alamatedit = Trim(!Path) imgobat.picture = LoadPicture(App.Path & alamatedit) Public Sub () Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Private Sub Form_Unload(Cancel As Integer) Do Me.Top = Me.Top + 40 Me.Move Me.Left, Me.Top DoEvents Loop Until Me.Top > Screen.Height - 500