?? frmcarsgcha.frm
字號:
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column13
DataField = "和解內(nèi)容"
Caption = "和解內(nèi)容"
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 "請選擇查詢條件", , "系統(tǒng)提示"
Exit Sub
End If
Set adors = adoCon.Execute(sql)
If adors.EOF Then
Call QingKong
MsgBox "對不起,沒有符合您查詢條件的車輛事故記錄!", , "系統(tǒng)提示"
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
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -