📄 frmyjtj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmYJTJ
Caption = "业绩统计"
ClientHeight = 6336
ClientLeft = 48
ClientTop = 336
ClientWidth = 10008
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6336
ScaleWidth = 10008
WindowState = 2 'Maximized
Begin VB.Frame Frame1
Height = 615
Left = 360
TabIndex = 0
Top = 120
Width = 9375
Begin VB.ComboBox Combo1
Height = 300
Left = 1080
TabIndex = 8
Top = 200
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "开始统计"
Height = 315
Left = 7800
TabIndex = 6
Top = 173
Width = 1275
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 315
Left = 6060
TabIndex = 2
Top = 173
Width = 1395
_ExtentX = 2455
_ExtentY = 572
_Version = 393216
Format = 203489281
UpDown = -1 'True
CurrentDate = 37394
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 315
Left = 3600
TabIndex = 3
Top = 173
Width = 1395
_ExtentX = 2455
_ExtentY = 572
_Version = 393216
Format = 203489281
UpDown = -1 'True
CurrentDate = 37394
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "员工姓名"
Height = 180
Left = 240
TabIndex = 7
Top = 240
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "终止日期"
Height = 180
Left = 5220
TabIndex = 5
Top = 240
Width = 720
End
Begin VB.Label Label2
Caption = "起始日期"
Height = 195
Left = 2760
TabIndex = 4
Top = 233
Width = 795
End
End
Begin MSAdodcLib.Adodc Adodc1
Align = 2 'Align Bottom
Height = 336
Left = 0
Top = 6000
Visible = 0 'False
Width = 10008
_ExtentX = 17653
_ExtentY = 593
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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
Align = 2 'Align Bottom
Height = 5112
Left = 0
TabIndex = 1
Top = 888
Width = 10008
_ExtentX = 17653
_ExtentY = 9017
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1.5
RowHeight = 15
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
Caption = "业绩查询列表"
ColumnCount = 2
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
SplitCount = 1
BeginProperty Split0
MarqueeStyle = 3
AllowFocus = 0 'False
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmYJTJ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox "请选择业务员姓名!", vbInformation + vbOKOnly, "错误"
Combo1.SetFocus
Exit Sub
End If
If DTPicker1.Value >= DTPicker2.Value Then
MsgBox "日期输入错误!", vbInformation + vbOKOnly, "错误"
Exit Sub
End If
Adodc1.ConnectionString = constr
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 订单表 where ((业务人员 = '" & Combo1.Text _
& "') And (预定时间 >= #" & Month(DTPicker1.Value) & "/" & Day(DTPicker1.Value) & "/" & Year(DTPicker1.Value) _
& "#) And (预定时间 <= #" & Month(DTPicker2.Value) & "/" & Day(DTPicker2.Value) & "/" & Year(DTPicker2.Value) & "#))"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
DataGrid1.ReBind
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = constr
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "业务员表"
Adodc1.Refresh
Combo1.Clear
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Combo1.AddItem Adodc1.Recordset(1)
Adodc1.Recordset.MoveNext
Wend
End Sub
Private Sub Form_Resize()
If Me.WindowState = 1 Then
Exit Sub
End If
With Frame1
.Left = (Me.Width - Frame1.Width) / 2
.Top = 120
End With
DataGrid1.Height = Me.Height - Frame1.Height - Adodc1.Height - 200
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -