2. Dialog Screen Cari Kendaraan
Nama Dialog Screen : Form Cari Kendaraan
Fungsi : Untuk Mencari data kendaraan yang
dibutuhkan oleh konsumen Bentuk
: Private Sub Check1_Click
On Error Resume Next If Check1.Value = Checked Then
Text3.Text = Ada cetak_listview Select from Kendaraan where Merk like Text1.Text and
Type like Text2.Text and Status like Text3.Text Else
Text3.Text = cetak_listview Select from Kendaraan where Merk like Text1.Text and
Type like Text2.Text and Status like Text3.Text End If
End Sub
Private Sub Command2_Click On Error Resume Next
If MsgBoxAnda Yakin Akan Keluar Dari Aplikasi InI....?, vbYesNo, admin = vbYes Then
sink Me Unload Me
MDIForm1.Show Else
Frm_Cari.Show End If
End Sub Private Sub Form_Load
On Error Resume Next BukaDB
add Frm_Cari.Left = 2500
Frm_Cari.Top = 900 Frm_Cari.Height = 6975
Frm_Cari.Width = 8595 Text1.SetFocus
End Sub Sub add
On Error Resume Next With ListView1
.View = lvwReport .ColumnHeaders.Clear
.ColumnHeaders.add , , No Polisi, 1200 .ColumnHeaders.add , , Merk, 1500
.ColumnHeaders.add , , Type, 1000 .ColumnHeaders.add , , Tahun, 900
.ColumnHeaders.add , , Warna, 900 .ColumnHeaders.add , , Status, 1000
.ColumnHeaders.add , , Harga, 2000 End With
cetak_listview SELECT No_Polisi,Merk,Type,Tahun,Warna,No_Rangka,No_Mesn,No_BPKB,An_BPKB,Harga_Ju
al,Status from Kendaraan
End Sub
Function cetak_listviewStr As String On Error Resume Next
ListView1.ListItems.Clear If rec.State Then rec.Close
rec.Open Str, con, adOpenDynamic, adLockOptimistic Do While Not rec.EOF
Set ditem = ListView1.ListItems.add With rec
ditem.Text = recNo_Polisi ditem.SubItems1 = recMerk
ditem.SubItems2 = recType ditem.SubItems3 = recTahun
ditem.SubItems4 = recWarna ditem.SubItems5 = recStatus
a = recHarga_Jual a = Formata, Rp + + ,0.00
a.SelStart = Lena - 3 ditem.SubItems6 = a
.MoveNext End With
Loop
End Function Private Sub ListView1_DblClick
On Error Resume Next If ListView1.ListItems.Count 0 Then
If rec.State = 1 Then rec.Close rec.Open select from Kendaraan where No_Polisi= ListView1.SelectedItem ,
con, 3, 3 If Not rec.EOF Then
Frm_Cek.Text1 = recNo_Polisi End If
If rec.State = 1 Then rec.Close rec.Open select from Kendaraan where No_Polisi= Frm_Cek.Text1 , con, 3, 3
If Not rec.EOF Then Frm_Cek.Text2 = recMerk
Frm_Cek.Text11 = recType Frm_Cek.Text3 = recTahun
Frm_Cek.Text4 = recWarna Frm_Cek.Text5 = recNo_rangka
Frm_Cek.Text6 = recNo_Mesn Frm_Cek.Text7 = recNo_BPKB
Frm_Cek.Text8 = recAn_BPKB Frm_Cek.Text12 = recSTNK
a = recHarga_Jual a = Formata, Rp + + ,0.00
a.SelStart = Lena - 3 Frm_Cek.Text9 = a
Frm_Cek.Text10 = recStatus Frm_Cek.Text13 = recKM
Frm_Cek.Text15 = recKeterangan Frm_Cek.Text14 = recPosisi_Kendaraan
End If Unload Me
Frm_Cek.Show End If
End Sub Private Sub Text1_Change
On Error Resume Next Text30 =
cetak_listview Select from Kendaraan where Merk like Text1.Text and Type like Text2.Text and Status like Text3.Text
End Sub Private Sub Text2_Change
On Error Resume Next Text30 =
cetak_listview Select from Kendaraan where Merk like Text1.Text and Type like Text2.Text and Status like Text3.Text
End Sub Private Sub Text30_Change
On Error Resume Next Text1 =
Text2 = cetak_listview Select from Kendaraan where No_Polisi like Text30.Text
and Status like Text3.Text
End Sub
3. Dialog Screen Input Leasing