📄 form8.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Form8
Caption = "输出窗口"
ClientHeight = 3795
ClientLeft = 60
ClientTop = 345
ClientWidth = 7545
ControlBox = 0 'False
LinkTopic = "Form8"
ScaleHeight = 3795
ScaleWidth = 7545
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "删除过期记录"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 5
Top = 2760
Width = 1935
End
Begin VB.CommandButton Command4
Caption = "生成HTML文件"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 4
Top = 1800
Width = 1935
End
Begin VB.CommandButton Command2
Caption = "退 出"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4440
TabIndex = 3
Top = 2760
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "打 印"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4440
TabIndex = 2
Top = 1800
Width = 1935
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "Form8.frx":0000
Height = 390
Left = 3360
TabIndex = 1
Top = 480
Width = 2535
_ExtentX = 4471
_ExtentY = 688
_Version = 393216
MatchEntry = -1 'True
Appearance = 0
ListField = "mc"
Text = ""
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1920
Top = 180
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 2
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=qfgl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=qfgl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "dqk"
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 VB.Label Label1
Caption = "请选择区县:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 0
Top = 480
Width = 1815
End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_Change()
End Sub
Private Sub Command1_Click()
If Adodc1.Recordset.EOF Then
MsgBox ("您必须做采集点维护才能执行此任务!!")
Exit Sub
End If
If DataCombo1.Text = "" Then
MsgBox ("请选择区县和月份。。")
Exit Sub
End If
Adodc1.Recordset.Find "mc='" & DataCombo1.Text & "'"
Dim kk As String
kk = Trim(Adodc1.Recordset!hm)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim cn1 As ADODB.Connection
Set cn1 = New ADODB.Connection
cn1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=qfgl"
cn1.Open
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Open "select * from dkkc where right(left(xfsh,6),2)='" & kk & "'", cn1
If rs.EOF Then
MsgBox ("没有所需的记录")
Exit Sub
End If
rs.Sort = "xfsh,rq"
Set drp2.DataSource = rs
drp2.Show 1
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Form6.Show 1
End Sub
Private Sub Command4_Click()
'Dim nn As String
'nn = Trim(Text1.Text)
If Adodc1.Recordset.EOF Then
MsgBox ("您必须做采集点维护才能执行此任务!!")
Exit Sub
End If
If DataCombo1.Text = "" Then
MsgBox ("请选择区县和月份。。")
Exit Sub
End If
Adodc1.Recordset.Find "mc='" & Trim(DataCombo1.Text) & "'"
Dim kk As String
kk = Trim(Adodc1.Recordset!hm)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim cn1 As ADODB.Connection
Set cn1 = New ADODB.Connection
cn1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=qfgl"
cn1.Open
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Open "select * from dkkc where right(left(xfsh,6),2)='" & kk & "'", cn1
If rs.EOF Then
MsgBox ("没有所需的记录")
Exit Sub
End If
rs.Sort = "xfsh,rq"
Set drp1.DataSource = rs
drp1.ExportReport rptKeyHTML, "c:\cjdwj\aa.htm", True, True, rptRangeAllPages
cn1.Close
Set rs = Nothing
End Sub
Private Sub Command5_Click()
'Text1.Text = Adodc1.Recordset.Supports(adMovePrevious)
End Sub
Private Sub DataCombo1_Click(Area As Integer)
If Area = 2 Then
Adodc1.Recordset.MoveFirst
Command4.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -