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

📄 frmcarwxcha.frm

📁 用VB开发的车辆数据库管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            EndProperty
            BeginProperty Column08 
               ColumnWidth     =   780.095
            EndProperty
            BeginProperty Column09 
               ColumnWidth     =   494.929
            EndProperty
         EndProperty
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "  查询条件"
      ForeColor       =   &H00FF0000&
      Height          =   1455
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5970
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmcarWXcha.frx":1C7A
         Left            =   1575
         List            =   "frmcarWXcha.frx":1C8D
         TabIndex        =   10
         Top             =   1035
         Width           =   735
      End
      Begin VB.TextBox txtFY 
         Enabled         =   0   'False
         Height          =   300
         Left            =   2325
         TabIndex        =   9
         Top             =   1020
         Width           =   2355
      End
      Begin VB.CheckBox ckfy 
         Caption         =   "维修费用:"
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   1035
         Width           =   1215
      End
      Begin VB.ComboBox cmcp 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "frmcarWXcha.frx":1CA7
         Left            =   1575
         List            =   "frmcarWXcha.frx":1CA9
         TabIndex        =   3
         Top             =   270
         Width           =   1320
      End
      Begin VB.CheckBox cktime 
         Caption         =   "维修日期:"
         Height          =   180
         Left            =   120
         TabIndex        =   2
         Top             =   705
         Width           =   1215
      End
      Begin VB.CheckBox ckcp 
         Caption         =   "车牌号码:"
         Height          =   255
         Left            =   120
         TabIndex        =   1
         Top             =   270
         Width           =   1215
      End
      Begin MSComCtl2.DTPicker dtEnd 
         Height          =   300
         Left            =   3360
         TabIndex        =   4
         Top             =   645
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   24903681
         CurrentDate     =   39148
      End
      Begin MSComCtl2.DTPicker dtStart 
         Height          =   300
         Left            =   1575
         TabIndex        =   5
         Top             =   645
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   24903681
         CurrentDate     =   39148
      End
      Begin VB.Image Imgexit 
         Height          =   330
         Left            =   4785
         Picture         =   "frmcarWXcha.frx":1CAB
         Stretch         =   -1  'True
         Top             =   930
         Width           =   1050
      End
      Begin VB.Image Imgcha 
         Height          =   330
         Left            =   4770
         Picture         =   "frmcarWXcha.frx":5C7D
         Stretch         =   -1  'True
         Top             =   240
         Width           =   1050
      End
      Begin VB.Label Label5 
         Caption         =   "到"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   3045
         TabIndex        =   7
         Top             =   705
         Width           =   255
      End
      Begin VB.Label Label6 
         Caption         =   "从"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   1335
         TabIndex        =   6
         Top             =   720
         Width           =   255
      End
   End
End
Attribute VB_Name = "frmcarWXcha"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:frmcarWXcha
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'**          业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'**          下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'**          不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网    址: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 ckfy_Click()
    If ckfy.Value Then
        Combo1.Enabled = True
        Combo1.ListIndex = 0
        txtFY.Enabled = True
    Else
        txtFY.Enabled = False
        Combo1.Enabled = False
    End If
End Sub

Private Sub cktime_Click()
    If cktime.Value Then
        dtStart.Enabled = True
        dtEnd.Enabled = True
    Else
        dtStart.Enabled = False
        dtEnd.Enabled = False
    End If
End Sub

Private Sub Form_Load()
    frmcarWXcha.Width = 6345
    frmcarWXcha.Height = 4290
    Call Rebind
   'add all cp in the table carWX
    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
    Set DataGrid1.DataSource = Adodc1
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()  '查询
        If IsNumeric(txtFY.Text) = False And ckfy.Value = 1 Then
            MsgBox "请输入数值类型", vbCritical, "车辆管理系统"
            Exit Sub
        End If
        Call QingKong
        Dim sql As String
        Dim scp As String
        If ckcp.Value Then
            scp = "车牌号码 like '" & cmCP.Text & "%'"
        Else
            scp = "车牌号码 like '%'"
        End If

        Dim stime As String
        If cktime.Value Then
            stime = "维修日期 between #" & dtStart.Month & "/" & dtStart.Day & "/" & dtStart.Year & "# and #" & dtEnd.Month & "/" & dtEnd.Day & "/" & dtEnd.Year & "#"
        Else
            stime = "维修日期 like '%'"
        End If

        Dim sfy As String
        If ckfy.Value Then
            sfy = "共计费用 " & Combo1.Text & "" & txtFY & ""
        Else
            sfy = "共计费用 like '%'"
        End If

        sql = "select * from 车辆维修表 where " & scp & "and " & stime & "and " & sfy

        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
        ckfy.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 + -