📄 frm_计量器具台帐强制检定.frm
字号:
Splits(0).DividerColor= 13160660
Splits(0).SpringMode= 0 'False
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
Splits(0)._ColumnProps(0)= "Columns.Count=2"
Splits(0)._ColumnProps(1)= "Column(0).Width=3281"
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=3175"
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
Splits(0)._ColumnProps(5)= "Column(1).Width=3281"
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=3175"
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
Splits.Count = 1
PrintInfos(0)._StateFlags= 0
PrintInfos(0).Name= "piInternal 0"
PrintInfos(0).PageHeaderFont= "Size=9,Charset=134,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=宋体"
PrintInfos(0).PageFooterFont= "Size=9,Charset=134,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=宋体"
PrintInfos(0).PageHeaderHeight= 0
PrintInfos(0).PageFooterHeight= 0
PrintInfos.Count= 1
AllowUpdate = 0 'False
Appearance = 2
DefColWidth = 0
HeadLines = 1
FootLines = 1
AllowArrows = 0 'False
MultipleLines = 0
CellTipsWidth = 0
DeadAreaBackColor= 13160660
RowDividerColor = 13160660
RowSubDividerColor= 13160660
DirectionAfterEnter= 1
MaxRows = 250000
ViewColumnCaptionWidth= 0
ViewColumnWidth = 0
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=900,.italic=0"
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=134"
_StyleDefs(5) = ":id=0,.fontname=宋体"
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34,.bgcolor=&HC0FFC0&"
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
_StyleDefs(38) = "Named:id=33:Normal"
_StyleDefs(39) = ":id=33,.parent=0"
_StyleDefs(40) = "Named:id=34:Heading"
_StyleDefs(41) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
_StyleDefs(42) = ":id=34,.wraptext=-1"
_StyleDefs(43) = "Named:id=35:Footing"
_StyleDefs(44) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
_StyleDefs(45) = "Named:id=36:Selected"
_StyleDefs(46) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
_StyleDefs(47) = "Named:id=37:Caption"
_StyleDefs(48) = ":id=37,.parent=34,.alignment=2"
_StyleDefs(49) = "Named:id=38:HighlightRow"
_StyleDefs(50) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
_StyleDefs(51) = "Named:id=39:EvenRow"
_StyleDefs(52) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
_StyleDefs(53) = "Named:id=40:OddRow"
_StyleDefs(54) = ":id=40,.parent=33"
_StyleDefs(55) = "Named:id=41:RecordSelector"
_StyleDefs(56) = ":id=41,.parent=34"
_StyleDefs(57) = "Named:id=42:FilterBar"
_StyleDefs(58) = ":id=42,.parent=33"
End
Begin VB.Label Ljl
AutoSize = -1 'True
BackColor = &H80000005&
Caption = "共查询到110条记录"
ForeColor = &H00008000&
Height = 180
Left = 6540
TabIndex = 2
Top = 1170
Width = 1530
End
Begin VB.Label Label22
AutoSize = -1 'True
BackColor = &H80000005&
Caption = "强制检定计量器具台帐"
BeginProperty Font
Name = "华文行楷"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 450
Left = 2010
TabIndex = 1
Top = 270
Width = 4350
End
Begin VB.Line Line8
BorderColor = &H00000000&
X1 = -30
X2 = 8220
Y1 = 1380
Y2 = 1380
End
Begin VB.Line Line2
BorderColor = &H00E0E0E0&
X1 = -30
X2 = 5400
Y1 = 900
Y2 = 900
End
End
End
Attribute VB_Name = "Frm_计量器具台帐强制检定"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Dim rsPri As New ADODB.Recordset
Dim rsls As New ADODB.Recordset
Dim Cx_Sql_Str As String
Public Cxmc As String
Private Function GetDwmc() As String
Dim rst As New ADODB.Recordset
If rst.State = 1 Then rst.Close
rst.CursorLocation = adUseClient
rst.Open "select * from dwxx", Conn
If rst.EOF = False Then
GetDwmc = Trim(rst!Dwmc)
Else
GetDwmc = ""
End If
End Function
Private Sub CmdBc_MouseHold()
If Frame1.Visible = True Then Exit Sub
End Sub
Private Sub CmdDc_Click()
' On Error GoTo err1
If rs.State <> 1 Then Exit Sub
If rs.RecordCount < 1 Then Exit Sub
If Frame1.Visible = True Then Frame1.Visible = False
Dim sjkname As String
CommonDialog1.DialogTitle = "保存报表文件"
CommonDialog1.Filter = "*.xls"
CommonDialog1.ShowSave
sjkname = CommonDialog1.FileName
If Trim(sjkname) = "" Then Exit Sub
Frame2.Visible = True
RePorts.EtCell1.OpenDoc App.Path & "\report\tz.eT"
RePorts.EtCell1.SetAliasCell "dwmc", "单位名称:" + GetDwmc()
RePorts.EtCell1.SetAliasCell "zdrq", "制单日期:" + CStr(Date)
RePorts.EtCell1.SetAliasCell "bt", "强制检定计量器具台帐"
rs.MoveFirst
For i = 0 To rs.Fields.Count - 5
If (i > 1) And (i < (rs.Fields.Count - 5)) Then RePorts.EtCell1.InsertCol 8
Next i
For i = 0 To rs.Fields.Count - 1
RePorts.EtCell1.SetCell 4, i + 2, rs.Fields(i).Name
Next i
i = 5
For j = 1 To rs.RecordCount - 1
RePorts.EtCell1.InsertRow i
Next j
rs.MoveFirst
Do While rs.EOF = False
For j = 0 To rs.Fields.Count - 1
RePorts.EtCell1.SetCell i, j + 2, rs.Fields(j)
Next j
i = i + 1
rs.MoveNext
Loop
rs.MoveFirst
If RePorts.EtCell1.SaveAs(sjkname & ".xls") Then
MsgBox "保存成功!", vbInformation, "报表保存"
Else
MsgBox "报表保存失败!", vbInformation, "报表保存"
End If
Unload RePorts
Frame2.Visible = False
Exit Sub
err1:
Unload RePorts
Frame2.Visible = False
Exit Sub
End Sub
Private Sub CmdLl_Click()
On Error GoTo ERR
If Frame1.Visible = True Then Frame1.Visible = False
Cx_Sql_Str = " select bh as 设备编号 , mc as 设备名称 , lb as 类别 , zb as 种别 , dj as 管理等级, zt as 设备状态, ggxh as 规格型号, clfw as 测量范围, fdz as 分度值, sccj as 生产厂家, ccbh as 出厂编号, sybm as 使用部门, syz as 使用者, qyrq as 启用日期, cstr([jdzq])+[Zqdw] AS 检定周期 ,jddw as 检定单位 from jlqjxx where dj='强制检定' "
If rs.State = 1 Then rs.Close
rs.CursorLocation = adUseClient
rs.Open Cx_Sql_Str, Conn, adOpenStatic, adLockReadOnly
Set Grid.DataSource = Nothing
Ljl.Caption = "共查询到 " & rs.RecordCount & " 条记录"
Set Grid.DataSource = rs
Exit Sub
ERR:
MsgBox "查询条件错误!!", vbCritical, "提示"
End Sub
Private Sub CmdPri_Click()
If Frame1.Visible = False Then Frame1.Visible = True
If rsls.State = 1 Then rsls.Close
Set GridPri.DataSource = Nothing
rsls.CursorLocation = adUseClient
rsls.Open "select * from pri where bm='基本信息'", Conn, adOpenDynamic, adLockBatchOptimistic
Set GridPri.DataSource = rsls
Frame1.Visible = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -