?? frmbiao.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmbiao
Caption = "抄表表單打印"
ClientHeight = 8295
ClientLeft = 60
ClientTop = 345
ClientWidth = 9630
LinkTopic = "Form1"
ScaleHeight = 8295
ScaleWidth = 9630
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "查詢條件"
Height = 975
Left = 120
TabIndex = 11
Top = 120
Width = 6135
Begin VB.ComboBox cmbElement
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1080
TabIndex = 15
Text = "Combo1"
Top = 360
Width = 1485
End
Begin MSComCtl2.DTPicker dtpStart
Height = 360
Left = 4080
TabIndex = 12
Top = 360
Width = 1545
_ExtentX = 2725
_ExtentY = 635
_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 = 24510467
CurrentDate = 36936
MaxDate = 40178
MinDate = 36892
End
Begin VB.Label Label1
Caption = "時間選擇:"
Height = 240
Index = 0
Left = 3240
TabIndex = 14
Top = 480
Width = 930
End
Begin VB.Label Label1
Caption = "樓號選擇:"
Height = 240
Index = 2
Left = 240
TabIndex = 13
Top = 480
Width = 930
End
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 315
Index = 0
Left = 360
TabIndex = 8
Top = 7455
Width = 1140
End
Begin VB.CommandButton Command1
Caption = "打印"
Height = 315
Index = 1
Left = 1890
TabIndex = 7
Top = 7455
Width = 1140
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 315
Index = 2
Left = 4665
TabIndex = 6
Top = 7455
Width = 1140
End
Begin VB.CommandButton Command1
Caption = "打印預覽"
Height = 315
Index = 3
Left = 3315
TabIndex = 5
Top = 7455
Visible = 0 'False
Width = 1140
End
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1815
Left = 6600
ScaleHeight = 1785
ScaleWidth = 1860
TabIndex = 3
Top = 3720
Width = 1890
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 915
Left = 360
ScaleHeight = 885
ScaleWidth = 1035
TabIndex = 4
Top = 480
Width = 1065
End
End
Begin VB.VScrollBar VScroll1
Height = 1215
Left = 8520
TabIndex = 2
Top = 4560
Width = 240
End
Begin VB.HScrollBar HScroll1
Height = 240
Left = 6960
TabIndex = 1
Top = 5760
Width = 1290
End
Begin VB.ComboBox Cmbclasshide
Height = 300
Left = 3000
TabIndex = 0
Text = "Combo1"
Top = 8760
Visible = 0 'False
Width = 1695
End
Begin MSAdodcLib.Adodc adcHandInfo
Height = 330
Left = 5760
Top = 8640
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 582
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 = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 6240
Top = 5400
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSFlexGridLib.MSFlexGrid mfgFee
Height = 3765
Left = 360
TabIndex = 9
Top = 3360
Width = 5490
_ExtentX = 9684
_ExtentY = 6641
_Version = 393216
Cols = 9
FixedCols = 0
WordWrap = -1 'True
AllowUserResizing= 3
Appearance = 0
FormatString = "用戶號|用戶名|用戶地址|上次抄表時間|上次表讀數|本次抄表時間|本次表讀數|電量|電費"
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 360
Left = 4800
TabIndex = 16
Top = 1800
Visible = 0 'False
Width = 1545
_ExtentX = 2725
_ExtentY = 635
_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 = 24510467
CurrentDate = 36936
MaxDate = 40178
MinDate = 36892
End
Begin VB.Label lblTitle
Alignment = 2 'Center
Caption = "Label2"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1200
TabIndex = 10
Top = 2280
Width = 3540
End
End
Attribute VB_Name = "frmbiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sPrecinct() As String
Dim sUserNumber() As String
Dim P As Object
Dim print_H As Integer
Dim print_W As Integer
Private Sub Command1_Click(Index As Integer)
On Error Resume Next
Dim MYSET As New ADODB.Recordset
Dim MyFeeset As New ADODB.Recordset
Dim MyFeeSet1 As New ADODB.Recordset
Dim strsql As String
Dim sStart As Single, dStart As Date
Dim sEnd As Single, dEnd As Date
Dim MyChangeSet As Recordset
Dim sPowerValue As Single, sTotalValue As Single, sTotalFee As Single
Dim dChange As Date, I As Integer, u As Integer, j As Integer
Dim CY As Single, CX As Single
Dim CY1 As Single, CX1 As Single
Dim CY2 As Single, CX2 As Single
Dim CY3 As Single, CX3 As Single
Dim MySet2 As Recordset
Dim sTotalValue_D As Single
Dim sTotalFee_D As Single
Dim sTotalValue_Water As Single
Dim sTotalFee_Water As Single
Dim changestotalfee As Single
Select Case Index
Case 0 '確定
lblTitle.Caption = cmbElement.Text & " " & dtpStart.Year & "年" & dtpStart.Month & "月 水電"
With mfgFee
.Clear
.FormatString = "< 樓 號 |<房 主|>" & IIf(dtpStart.Month = 1, 12, dtpStart.Month - 1) & "月電表數|>" & dtpStart.Month & "月電表數|" & _
">" & IIf(dtpStart.Month = 1, 12, dtpStart.Month - 1) & "月衛表數|>" & dtpStart.Month & "月衛表數|>" & IIf(dtpStart.Month = 1, 12, dtpStart.Month - 1) & "月廚表數|>" & dtpStart.Month & "月廚表數|" & _
"> 備注|"
.Rows = 1
.Cols = 9
If cmbElement.Text = "" Then
strsql = "select * from user1 "
Else
strsql = "select * from user1 where LOUHAOID='" & cmbElement.Text & "'"
End If
strsql = strsql & " order by userid1"
MYSET.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
Do Until MYSET.EOF
.Rows = .Rows + 1
.row = .Rows - 1
sTotalFee = 0
strsql = "select * from datawork where userid1=" & _
MYSET("userid1") & _
" and clloyear=" & _
dtpStart.Year & _
" and cllomonth=" & dtpStart.Month
MyFeeset.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
If MyFeeset.EOF Then
GoTo f:
End If
f: DTPicker1.Year = dtpStart.Year
DTPicker1.Month = dtpStart.Month
e: MyFeeSet1.Close
If DTPicker1.Year < 2003 Then
GoTo g:
End If
strsql = "select * from datawork where userid1=" & _
MYSET("userid1") & _
" and clloyear=" & IIf(DTPicker1.Month = 1, DTPicker1.Year - 1, DTPicker1.Year) & " and cllomonth=" & _
IIf(DTPicker1.Month = 1, 12, DTPicker1.Month - 1)
MyFeeSet1.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
If MyFeeSet1.EOF Then
DTPicker1.Year = IIf(DTPicker1.Month = 1, DTPicker1.Year - 1, DTPicker1.Year)
DTPicker1.Month = IIf(DTPicker1.Month = 1, 12, DTPicker1.Month - 1)
GoTo e:
End If
g: .Col = 0
.Text = MYSET("huhao")
.Col = 1
.Text = MYSET("name")
.Col = 2
.Text = MyFeeSet1("elcmeter")
.Col = 3
'.Text = MyFeeset("elcmeter")
.Col = 4
.Text = MyFeeSet1("watermeter")
.Col = 5
'.Text = MyFeeset("watermeter")
.Col = 6
.Text = MyFeeSet1("watermeter1")
.Col = 7
'.Text = MyFeeset("watermeter1")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -