?? 查詢結果顯示.frm
字號:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form 查詢結果顯示
Caption = "查詢結果顯示界面"
ClientHeight = 6285
ClientLeft = 60
ClientTop = 450
ClientWidth = 13020
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6285
ScaleWidth = 13020
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "打印列表"
Height = 495
Left = 8280
TabIndex = 2
Top = 5640
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 495
Left = 3600
TabIndex = 1
Top = 5640
Width = 1455
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 1680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 4440
Visible = 0 'False
Width = 4575
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\交通大隊扣車\jjdd.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 1680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "jjdd"
Top = 3720
Visible = 0 'False
Width = 4455
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "查詢結果顯示.frx":0000
Height = 5055
Left = 120
OleObjectBlob = "查詢結果顯示.frx":0014
TabIndex = 0
Top = 360
Width = 12735
End
End
Attribute VB_Name = "查詢結果顯示"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim b As Long
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Data1_Reposition()
Dim Query As String
If 信息查詢.Combo1.ListIndex = 0 Then
Query = "select * from jjdd where state=0 And Type=0 And b=0"
ElseIf 信息查詢.Combo1.ListIndex = 1 Then
Query = "select * from jjdd where state=0 And Type=1 "
End If
Data2.RecordSource = Query
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\" + "jjdd.mdb"
Data1.Refresh
Data2.DatabaseName = App.Path + "\" + "jjdd.mdb"
Data2.Refresh
End Sub
Function cptTime(pTime As String)
Dim fTime, eTime, fY, fM, fD, eY, eM, eD As String
Dim pY, pM, pD As String
fTime = 信息查詢.Text2.Text
eTime = 信息查詢.Text3.Text
fY = DatePart("y", fTime)
fM = DatePart("m", fTime)
fD = DatePart("d", fTime)
eY = DatePart("y", fTime)
eM = DatePart("m", fTime)
eD = DatePart("d", fTime)
pY = DatePart("y", pTime)
pM = DatePart("m", pTime)
pD = DatePart("d", pTime)
If pY >= fY And pY <= eY Then
If pM >= fM And pM <= eM Then
If pD >= fD And pD <= eD Then
b = 1
Else
b = 0
End If
Else
b = 0
End If
Else
b = 0
End If
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -