frmcarSGcha.frm
资源名称:0123..rar [点击查看]
上传用户:naidiweb
上传日期:2013-08-15
资源大小:672k
文件大小:19k
源码类别:
软件设计/软件工程
开发平台:
WORD
- 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 frmcarSGcha
- Caption = "车辆事故记录查询窗体"
- ClientHeight = 3480
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6255
- FillColor = &H00FF0000&
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 3480
- ScaleWidth = 6255
- Begin VB.Frame Frame2
- Caption = "Frame2"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 1995
- Left = 135
- TabIndex = 10
- Top = 1380
- Width = 5985
- Begin MSAdodcLib.Adodc Adodc1
- Height = 360
- Left = 1065
- Top = 765
- Visible = 0 'False
- Width = 2805
- _ExtentX = 4948
- _ExtentY = 635
- 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
- Bindings = "frmcarSGcha.frx":0000
- Height = 1605
- Left = 135
- TabIndex = 11
- Top = 255
- Width = 5685
- _ExtentX = 10028
- _ExtentY = 2831
- _Version = 393216
- AllowUpdate = 0 'False
- BackColor = 16776960
- ForeColor = 8388608
- HeadLines = 1
- RowHeight = 15
- FormatLocked = -1 'True
- 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 = 14
- 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
- BeginProperty Column02
- 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 Column03
- 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 Column04
- 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 Column05
- 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 Column06
- 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 Column07
- 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 Column08
- 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 Column09
- 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 Column10
- 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 Column11
- 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 Column12
- 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 Column13
- 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
- ColumnWidth = 824.882
- EndProperty
- BeginProperty Column01
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column02
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column03
- ColumnWidth = 840.189
- EndProperty
- BeginProperty Column04
- ColumnWidth = 915.024
- EndProperty
- BeginProperty Column05
- ColumnWidth = 1184.882
- EndProperty
- BeginProperty Column06
- ColumnWidth = 1049.953
- EndProperty
- BeginProperty Column07
- ColumnWidth = 1019.906
- EndProperty
- BeginProperty Column08
- ColumnWidth = 1005.165
- EndProperty
- BeginProperty Column09
- ColumnWidth = 824.882
- EndProperty
- BeginProperty Column10
- ColumnWidth = 794.835
- EndProperty
- BeginProperty Column11
- ColumnWidth = 1244.976
- EndProperty
- BeginProperty Column12
- ColumnWidth = 1214.929
- EndProperty
- BeginProperty Column13
- ColumnWidth = 870.236
- EndProperty
- EndProperty
- End
- End
- Begin VB.Frame Frame1
- Caption = " 查询条件"
- ForeColor = &H00FF0000&
- Height = 1185
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 5970
- Begin VB.CheckBox ckcp
- Caption = "车牌号码:"
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 360
- Width = 1215
- End
- Begin VB.CheckBox cktime
- Caption = "事故时间:"
- Height = 180
- Left = 120
- TabIndex = 4
- Top = 750
- Width = 1215
- End
- Begin VB.ComboBox cmCP
- Enabled = 0 'False
- Height = 300
- Left = 1560
- TabIndex = 3
- Top = 360
- Width = 1335
- End
- Begin VB.CommandButton cmdExit
- Caption = "退 出(&E)"
- Height = 345
- Left = 4890
- TabIndex = 2
- Top = 690
- Width = 975
- End
- Begin VB.CommandButton cmdCha
- Caption = "查 询(&F)"
- Height = 330
- Left = 4890
- TabIndex = 1
- Top = 360
- Width = 975
- End
- Begin MSComCtl2.DTPicker dtEnd
- Height = 300
- Left = 3375
- TabIndex = 6
- Top = 750
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Enabled = 0 'False
- Format = 66191361
- CurrentDate = 38053
- End
- Begin MSComCtl2.DTPicker dtStart
- Height = 300
- Left = 1560
- TabIndex = 7
- Top = 750
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Enabled = 0 'False
- Format = 66191361
- CurrentDate = 38053
- End
- Begin VB.Label Label6
- Caption = "从"
- ForeColor = &H00FF0000&
- Height = 255
- Left = 1320
- TabIndex = 9
- Top = 810
- Width = 255
- End
- Begin VB.Label Label5
- Caption = "到"
- ForeColor = &H00FF0000&
- Height = 255
- Left = 3045
- TabIndex = 8
- Top = 810
- Width = 255
- End
- End
- End
- Attribute VB_Name = "frmcarSGcha"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub ckcp_Click()
- If ckcp.Value Then
- cmCP.Enabled = True
- Else
- cmCP.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 cmdCha_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 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
- sql = "select * from 车辆事故表 where " & scp & "and " & stime
- 'MsgBox sql
- If sql = "select * from 车辆事故表 where 车牌号码 like '%'and 事故时间 like '%'" Then
- Call QingKong
- MsgBox "请选择查询条件", , "系统提示"
- Exit Sub
- End If
- Set adors = adoCon.Execute(sql)
- If adors.EOF Then
- Call QingKong
- MsgBox "对不起,没有符合您查询条件的车辆事故记录!", , "系统提示"
- Else
- Adodc1.RecordSource = sql
- Adodc1.Refresh
- End If
- adors.Close
- ckcp.Value = 0
- cktime.Value = 0
- End Sub
- Private Sub cmdExit_Click()
- MDIForm1.StatusBar1.Panels(1).Text = ""
- Unload Me
- End Sub
- Private Sub Form_Load()
- frmcarSGcha.Width = 6375
- frmcarSGcha.Height = 3885
- Call Rebind
- 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
- 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 0=1"
- Adodc1.Refresh
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- cmdExit_Click
- End Sub