📄 frmjsdxx.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 = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmJSDXX
Caption = "Form1"
ClientHeight = 8175
ClientLeft = 60
ClientTop = 345
ClientWidth = 9585
LinkTopic = "Form1"
ScaleHeight = 8175
ScaleWidth = 9585
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Cmdprint
BackColor = &H00FF8080&
Caption = "打印"
Height = 330
Left = 7365
Style = 1 'Graphical
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.CommandButton Cmdquery
BackColor = &H0000FF00&
Caption = "查询"
Height = 330
Left = 7350
Style = 1 'Graphical
TabIndex = 3
Top = 1590
Width = 1215
End
Begin VB.CommandButton Cmdclose
BackColor = &H000000FF&
Caption = "退出"
Height = 330
Left = 7350
Style = 1 'Graphical
TabIndex = 2
Top = 3180
Width = 1215
End
Begin VB.CommandButton CmdSetup
Caption = "打印设置"
Height = 330
Left = 7350
TabIndex = 1
Top = 2700
Width = 1215
End
Begin VB.TextBox TextLDH
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 8040
TabIndex = 0
Top = 1080
Width = 1455
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmJSDXX.frx":0000
Height = 6195
Left = 0
TabIndex = 5
Top = 1440
Width = 7155
_ExtentX = 12621
_ExtentY = 10927
_Version = 393216
AllowUpdate = 0 'False
BackColor = 16777152
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 = 6
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 = "日期CX"
Caption = "日期CX"
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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 794.835
EndProperty
BeginProperty Column01
ColumnWidth = 1005.165
EndProperty
BeginProperty Column02
ColumnWidth = 1005.165
EndProperty
BeginProperty Column03
ColumnWidth = 1214.929
EndProperty
BeginProperty Column04
ColumnWidth = 1214.929
EndProperty
BeginProperty Column05
ColumnWidth = 4995.213
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5340
Top = 0
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 690
Left = 120
Top = 480
Visible = 0 'False
Width = 1680
_ExtentX = 2963
_ExtentY = 1217
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 MSComCtl2.DTPicker DTPicker2
BeginProperty DataFormat
Type = 1
Format = "yyyy-MM-dd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Height = 300
Left = 7200
TabIndex = 6
Top = 750
Width = 1290
_ExtentX = 2275
_ExtentY = 529
_Version = 393216
Format = 61931521
CurrentDate = 37696
End
Begin MSComCtl2.DTPicker DTPicker1
BeginProperty DataFormat
Type = 1
Format = "yyyy-MM-dd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Height = 300
Left = 7185
TabIndex = 7
Top = 345
Width = 1290
_ExtentX = 2275
_ExtentY = 529
_Version = 393216
Format = 61931521
CurrentDate = 37696
End
Begin VB.Label Label1
Caption = "日 期:"
Height = 285
Index = 0
Left = 6540
TabIndex = 13
Top = 375
Width = 990
End
Begin VB.Label Label5
Caption = "至"
Height = 285
Left = 6840
TabIndex = 12
Top = 750
Width = 270
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "总记录数:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4560
TabIndex = 11
Top = 540
Width = 945
End
Begin VB.Label LabZJL
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5580
TabIndex = 10
Top = 540
Width = 750
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电 压 处 理 查 询"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 360
Index = 1
Left = 1530
TabIndex = 9
Top = 120
Width = 3225
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "请输入要查询的手机号:"
BeginProperty Font
Name = "新宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 6120
TabIndex = 8
Top = 1200
Width = 1980
End
End
Attribute VB_Name = "FrmJSDXX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim lAdoRs As New ADODB.Recordset
Dim sql As String
Private Sub CmdSetup_Click() '打印设置按钮的单击事件
On Error Resume Next
CommonDialog1.Flags = cdlPDPrintSetup
CommonDialog1.CancelError = True
On Error GoTo ErrorHandle
CommonDialog1.ShowPrinter
ErrorHandle:
End Sub
Private Sub CmdClose_Click() '关闭按钮的单击事件
On Error Resume Next
Unload Me
End Sub
Private Sub Cmdquery_Click() '查询按钮的单击事件
On Error Resume Next
sql = ""
sql = "select DQDXX.手机号码,DQDXX.日期,DQDXX.时间,DQDXX.司机姓名,DQDXX.短消息内容 ,DQDXX.日期CX from DQDXX where DQDXX.日期 between #" + Format(DTPicker1.Value, "yyyy-mm-dd") + "# and #" + Format(DTPicker2.Value, "yyyy-mm-dd") + "# "
If Trim(TextLDH.Text) <> "" Then
sql = sql + "and DQDXX.手机号码='" + Trim(TextLDH.Text) + "'"
End If
sql = sql & "order by 日期CX DESC"
Adodc1.RecordSource = Trim(sql)
Adodc1.Refresh
LabZJL.Caption = Adodc1.Recordset.RecordCount
End Sub
Private Sub CmdPrint_Click()
On Error Resume Next
If sql = "" Then
Exit Sub
End If
Me.Refresh
On Error Resume Next
Set lAdoRs = New ADODB.Recordset
lAdoRs.CursorLocation = adUseClient
lAdoRs.Open Adodc1.RecordSource, adocnstring, adOpenDynamic, adLockOptimistic, adCmdText
Set ReportDYCL.DataSource = lAdoRs
ReportDYCL.Sections(1).Controls(1).Caption = Format(DTPicker1.Value, "yyyy年mm月dd日") & "至" & Format(DTPicker2.Value, "yyyy年mm月dd日")
ReportDYCL.Sections(3).Controls(3).Caption = gUserName
ReportDYCL.Sections(6).Controls(6).Caption = Trim(LabZJL.Caption)
ReportDYCL.Show vbModal
lAdoRs.Close
End Sub
Private Sub Form_Load()
On Error Resume Next
TextLDH.SetFocus
DTPicker1.Value = Now
DTPicker2.Value = Now
Set lAdoRs = New ADODB.Recordset
lAdoRs.CursorLocation = adUseClient
Adodc1.ConnectionString = adocnstring
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -