⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmcaryycha.frm

📁 用VB开发的车辆数据库管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmcarYYcha 
   Caption         =   "车辆运营查询"
   ClientHeight    =   3855
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6495
   Icon            =   "frmcarYYcha.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3855
   ScaleWidth      =   6495
   Begin VB.Frame Frame1 
      Caption         =   "  查询条件"
      ForeColor       =   &H00FF0000&
      Height          =   1590
      Left            =   120
      TabIndex        =   2
      Top             =   75
      Width           =   6285
      Begin VB.ComboBox cmcp 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "frmcarYYcha.frx":1C7A
         Left            =   1605
         List            =   "frmcarYYcha.frx":1C7C
         TabIndex        =   8
         Top             =   285
         Width           =   1920
      End
      Begin VB.CheckBox ckDate 
         Caption         =   "运营日期:"
         Height          =   180
         Left            =   180
         TabIndex        =   7
         Top             =   750
         Width           =   1215
      End
      Begin VB.CheckBox ckcp 
         Caption         =   "车牌号码:"
         Height          =   255
         Left            =   180
         TabIndex        =   6
         Top             =   285
         Width           =   1215
      End
      Begin VB.CheckBox ckTime 
         Caption         =   "运营时间:"
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   180
         TabIndex        =   5
         Top             =   1140
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "frmcarYYcha.frx":1C7E
         Left            =   1635
         List            =   "frmcarYYcha.frx":1CCA
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   1140
         Width           =   1335
      End
      Begin VB.ComboBox Combo2 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "frmcarYYcha.frx":1D3C
         Left            =   3450
         List            =   "frmcarYYcha.frx":1D88
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   1125
         Width           =   1335
      End
      Begin MSComCtl2.DTPicker dtEnd 
         Height          =   300
         Left            =   3450
         TabIndex        =   9
         Top             =   750
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   61014017
         CurrentDate     =   39148
      End
      Begin MSComCtl2.DTPicker dtStart 
         Height          =   300
         Left            =   1650
         TabIndex        =   10
         Top             =   750
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   61014017
         CurrentDate     =   39148
      End
      Begin VB.Image Imgexit 
         Height          =   330
         Left            =   4965
         Picture         =   "frmcarYYcha.frx":1DFC
         Stretch         =   -1  'True
         Top             =   1110
         Width           =   1050
      End
      Begin VB.Image Imgcha 
         Height          =   330
         Left            =   4965
         Picture         =   "frmcarYYcha.frx":5DCE
         Stretch         =   -1  'True
         Top             =   300
         Width           =   1050
      End
      Begin VB.Label Label5 
         Caption         =   "到"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   3210
         TabIndex        =   14
         Top             =   780
         Width           =   255
      End
      Begin VB.Label Label6 
         Caption         =   "从"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   1410
         TabIndex        =   13
         Top             =   780
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "从"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   1395
         TabIndex        =   12
         Top             =   1170
         Width           =   255
      End
      Begin VB.Label Label3 
         Caption         =   "到"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   3195
         TabIndex        =   11
         Top             =   1170
         Width           =   255
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Frame2"
      Height          =   2010
      Left            =   90
      TabIndex        =   0
      Top             =   1755
      Width           =   6345
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   3510
         Top             =   1155
         Visible         =   0   'False
         Width           =   1890
         _ExtentX        =   3334
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   1
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
         OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "select * from 车辆运营表"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   1680
         Left            =   135
         TabIndex        =   1
         Top             =   225
         Width           =   6060
         _ExtentX        =   10689
         _ExtentY        =   2963
         _Version        =   393216
         AllowUpdate     =   0   'False
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "frmcarYYcha"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:frmcarYYcha
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'**          业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'**          下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'**          不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网    址:www.mingrisoft.com  价值无限,服务无限
'**电    话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日    期:2007-10-31
'**修 改 人:mraj
'**日    期:2007-10-31
'**描    述:
'*************************************************************************
Private Sub ckcp_Click()
    If ckcp.Value Then
        cmCP.Enabled = True
    Else
        cmCP.Enabled = False
    End If
End Sub
Private Sub ckDate_Click()
    If ckDate.Value Then
        dtStart.Enabled = True
        dtEnd.Enabled = True
    Else
        dtStart.Enabled = True
        dtEnd.Enabled = True
    End If
End Sub

Private Sub cktime_Click()
    If cktime.Value Then
        Combo1.Enabled = True
        Combo2.Enabled = True
    Else
        Combo1.Enabled = False
        Combo2.Enabled = False
    End If
End Sub
Private Sub Form_Load()
    '设置窗体大小
    frmcarYYcha.Width = 6615
    frmcarYYcha.Height = 4260
    Call Rebind
    Call main1
    Set adors = adoCon.Execute("select distinct 车牌号码 from 车辆运营表")
    On Error Resume Next
    Do
        cmCP.AddItem adors.Fields(0)
        adors.MoveNext
    Loop Until adors.EOF
    adors.Close
    adoCon.Close
    For i = 1 To 24
        cmbstar.AddItem i
        cmbend.AddItem i
    Next i
    cmbstar.ListIndex = 7
    cmbend.ListIndex = 11
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from 车辆运营表"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
    Combo1.ListIndex = 0
    Combo2.ListIndex = 0
End Sub
Private Sub Rebind()
    Frame2.Caption = "车辆运营列表"
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False"
    Adodc1.RecordSource = "select * from 车辆运营表"
    Adodc1.Refresh
End Sub
Private Sub QingKong()
    Frame2.Caption = "您所要查询的车辆运营记录如下:"
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False"
    Adodc1.RecordSource = "select * from 车辆运营表 where 1=0"
    Adodc1.Refresh
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Imgexit_Click
End Sub
Private Sub Imgcha_Click()   '查询
   '点击查询按纽后首先清空车辆档案列表
    Call QingKong
    Dim sql As String
    Dim scp As String
    If ckcp.Value Then
       scp = "车牌号码 like '%" & cmCP.Text & "%'"
    Else
        scp = "车牌号码 like '%'"
    End If
    Dim sdate As String
    If ckDate.Value Then
        sdate = "运营日期 between #" & dtStart.Month & "/" & dtStart.Day & "/" & dtStart.Year & "# and #" & dtEnd.Month & "/" & dtEnd.Day & "/" & dtEnd.Year & "#"
        Else
        sdate = "运营日期 like '%'"
    End If
    Dim stime As String
    If cktime.Value Then
        stime = "运营时间 between " & Combo1.Text & " and " & Combo2.Text & ""
        Else
        stime = "运营时间 like '%'"
    End If
    sql = "select * from 车辆运营表 where " & scp & "and " & sdate & "and " & stime
    If sql = "select * from 车辆运营表 where 车牌号码 like '%'and 运营日期 like '%'and 运营时间 like '%'" Then
        Call QingKong
        MsgBox "请选择查询条件", , "车辆管理系统"
        Exit Sub
    End If
    Call main1
    Set adors = adoCon.Execute(sql)
    If adors.EOF Then
        Call QingKong
        MsgBox "对不起,没有符合您查询条件的车辆!", , "车辆管理系统"
    Else
       Adodc1.RecordSource = sql
       Adodc1.Refresh
    End If
    adors.Close
    adoCon.Close
    ckcp.Value = 0
    cktime.Value = 0
    ckDate.Value = 0

End Sub

Private Sub Imgexit_Click()   '退出
    MDIForm1.StatusBar1.Panels(1).Text = ""
    Unload Me

End Sub



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -