📄 frmlist.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Begin VB.Form frmList
BorderStyle = 3 'Fixed Dialog
Caption = "用户信息"
ClientHeight = 6420
ClientLeft = 45
ClientTop = 330
ClientWidth = 11625
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6420
ScaleWidth = 11625
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "查询条件设置"
Height = 735
Left = 360
TabIndex = 2
Top = 840
Width = 10935
Begin CSCommand.Command Command1
Height = 375
Left = 8520
TabIndex = 6
Top = 240
Width = 1215
_ExtentX = 2143
_ExtentY = 661
IconAlign = 0
Icon = "Frmlist.frx":0000
Caption = "返回"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdExport
Height = 375
Left = 6600
TabIndex = 5
Top = 240
Width = 1335
_ExtentX = 2355
_ExtentY = 661
IconAlign = 0
Icon = "Frmlist.frx":001C
Caption = "导出到Excel"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComCtl2.DTPicker dtpE
Height = 375
Left = 2040
TabIndex = 3
Top = 240
Width = 1335
_ExtentX = 2355
_ExtentY = 661
_Version = 393216
Format = 66060289
CurrentDate = 38397
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "结束时间:"
Height = 180
Left = 960
TabIndex = 4
Top = 360
Width = 900
End
End
Begin VB.PictureBox Picture1
BackColor = &H00C0C000&
BorderStyle = 0 'None
Height = 615
Left = -120
Picture = "Frmlist.frx":0038
ScaleHeight = 615
ScaleWidth = 11655
TabIndex = 1
Top = 0
Width = 11655
End
Begin MSDataGridLib.DataGrid dgExp
Height = 4455
Left = 360
TabIndex = 0
Top = 1800
Width = 10935
_ExtentX = 19288
_ExtentY = 7858
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
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 = 7
BeginProperty Column00
DataField = "holderid"
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 = "holder"
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 = "cfeemoney"
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 = "FeeMoney"
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 = "months"
Caption = "上次交费日期"
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 = "LEndPCode"
Caption = "上次电表止码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "cname"
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
EndProperty
BeginProperty Column01
EndProperty
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
EndProperty
BeginProperty Column05
EndProperty
BeginProperty Column06
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rsdg As New ADODB.Recordset
Public qfFlg As Boolean
Private Sub cmdExport_Click()
'导出网格数据到EXCEL中
Export rsdg, dgExp, "用户信息"
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim Sqlstr As String
Dim whrStr As String
dtpE.Value = Format(Now, "yyyy-mm-dd")
Dim feeC As Double
Dim znjC As Double
'拼Where 语句
whrStr = getWhrStr()
'取得网格的数据
If qfFlg = False Then
Sqlstr = "select * from 统计 " & whrStr
Else
Sqlstr = "select * from 统计 " & whrStr & " and cfeemoney>0"
End If
rsdg.Open Sqlstr, gCnn, adOpenStatic, adLockOptimistic
'Set rsdg = getQueryData(Sqlstr)
Set dgExp.DataSource = rsdg
End Sub
Private Function getWhrStr() As String
'功能描述:拼凑Where语句
'返回串值
Dim whrStr As String
'拼Where 语句
whrStr = " where months <= # " & Format(dtpE, "yyyy-mm-dd") & " # "
getWhrStr = whrStr
End Function
Private Sub Form_Unload(Cancel As Integer)
rsdg.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -