?? 統計出差.frm
字號:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form 統計出差
Caption = "統計出差"
ClientHeight = 7980
ClientLeft = 60
ClientTop = 450
ClientWidth = 12510
LinkTopic = "Form2"
ScaleHeight = 7980
ScaleWidth = 12510
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "確定"
Height = 615
Left = 7080
TabIndex = 8
Top = 2040
Width = 1935
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 2640
Options = 0
ReadOnly = 0 'False
RecordsetType = 0 'Table
RecordSource = "出差管理"
Top = 7320
Width = 6255
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "統計出差.frx":0000
Height = 1695
Left = 960
TabIndex = 7
Top = 4200
Width = 7575
_ExtentX = 13361
_ExtentY = 2990
_Version = 393216
End
Begin VB.TextBox Text3
Height = 615
Left = 3240
TabIndex = 6
Top = 3360
Width = 3015
End
Begin VB.TextBox Text2
Height = 495
Left = 3240
TabIndex = 4
Top = 2400
Width = 3015
End
Begin VB.TextBox Text1
Height = 495
Left = 3240
MaxLength = 6
TabIndex = 1
Top = 1560
Width = 3015
End
Begin VB.Label Label4
Caption = "統計結束日期"
Height = 255
Left = 1560
TabIndex = 5
Top = 3600
Width = 1215
End
Begin VB.Label Label3
Caption = "統計開始日期"
Height = 375
Left = 1560
TabIndex = 3
Top = 2520
Width = 1215
End
Begin VB.Label Label2
Caption = "所要統計的職工ID"
Height = 375
Left = 1440
TabIndex = 2
Top = 1680
Width = 1575
End
Begin VB.Label Label1
Caption = "統計職工出差情況"
BeginProperty Font
Name = "宋體"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3480
TabIndex = 0
Top = 480
Width = 3855
End
End
Attribute VB_Name = "統計出差"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Do While Len(Text1) <> 6
If Len(Text1) <> 6 Then
MsgBox ("職工號有誤")
Text1 = InputBox("請再次輸入職工號")
End If
Loop
Do While Len(Text2) <> 10
If Len(Text2) <> 10 Then
MsgBox ("日期有誤")
Text2 = InputBox("請再次輸入開始日期")
End If
Loop
Do While Len(Text3) <> 10
If Len(Text3) <> 10 Then
MsgBox ("日期有誤")
Text3 = InputBox("請再次輸入結束日期")
End If
Loop
Dim sql As String
Data1.DatabaseName = "D:\大作業\企業考勤管理系統\公司考勤管理系統\自己動手\爵哥\爵哥\db1.mdb"
sql = "select 職工ID, count(*) as 出差次數 from 出差管理 where 職工ID=" & " '" & Text1 & "' and 開始日期>" & "#" & Text2 & "# and 結束日期<" & "#" & Text3 & "# group by 職工ID "
Data1.RecordSource = sql
Data1.Refresh
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -