📄 frm通信运行分析.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm通信运行分析
Caption = "调度月报 ----通信运行分析"
ClientHeight = 6540
ClientLeft = 60
ClientTop = 345
ClientWidth = 7065
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6540
ScaleWidth = 7065
Begin VB.CommandButton command1
Caption = "确定"
Height = 375
Left = 3960
TabIndex = 2
Top = 0
Width = 1215
End
Begin VB.TextBox Text1
BackColor = &H80000000&
ForeColor = &H00800000&
Height = 5895
Left = 0
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 480
Width = 6975
End
Begin VB.CommandButton Command2
Caption = "打印"
Height = 375
Left = 5400
TabIndex = 0
Top = 0
Width = 1095
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 2280
TabIndex = 3
Top = 0
Width = 1215
_ExtentX = 2143
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
CustomFormat = "yyyy-MM"
Format = 61145091
UpDown = -1 'True
CurrentDate = 37917
End
Begin VB.Label Label1
Caption = "时间"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 4
Top = 0
Width = 615
End
End
Attribute VB_Name = "frm通信运行分析"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
Call Open_link
Sql = "SELECT * from xdgl_ddyb_text where type='通信运行分析' and rq='" & Format(DTPicker1.Value, "yyyy-mm-01") & "'"
Set RS = ZHCX.Execute(Sql, 1)
If RS.EOF Then
If RS.State Then
RS.Close
End If
Sql = "insert xdgl_ddyb_text (rq,type,nr) values ('" & Format(DTPicker1.Value, "YYYY-MM-01") & "','电网运行情况分析','" & Text1.Text & "')"
Set RS = ZHCX.Execute(Sql, 1)
Else
If RS.State Then
RS.Close
End If
Sql = "update xdgl_ddyb_text set nr='" & Text1.Text & "' where rq='" & Format(DTPicker1.Value, "YYYY-MM-01") & "' and type='电网运行情况分析'"
Set RS = ZHCX.Execute(Sql, 1)
End If
If RS.State Then
RS.Close
End If
Call Close_link
End Sub
Private Sub Command2_Click()
Dim sendword As Word.Application
Set sendword = CreateObject("Word.Application")
sendword.Visible = True
sendword.Documents.Add
'sendword.Selection.TypeText Text:=" 电网运行分析" + Chr(13) + Chr(10)
'sendword.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
'sendword.Selection.MoveLeft Unit:=wdCharacter, Count:=6, Extend:=wdExtend
'sendword.Selection.Font.Size = 22
'sendword.Selection.TypeParagraph
'sendword.Selection.TypeParagraph
sendword.Selection.Font.Size = 12
sendword.Selection.TypeText Text:=" " & Format(DTPicker1.Value, "yyyy年mm月") & "通信运行分析" + Chr(13) + Chr(10) + Text1
End Sub
Private Sub DTPicker1_Change()
Call Open_link
Sql = "SELECT * from xdgl_ddyb_text where type='通信运行分析' and rq='" & Format(DTPicker1.Value, "yyyy-mm-01") & "'"
Set RS = ZHCX.Execute(Sql, 1)
If RS.EOF Then
Text1.Text = ""
Else
Text1.Text = RS("nr")
End If
If RS.State Then
RS.Close
End If
Call Close_link
End Sub
Private Sub Form_Load()
On Error Resume Next
DTPicker1.Value = Format(Now, "YYYY-MM-01")
Call DTPicker1_Change
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -