📄 frm_shoufei_wei.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{00025600-0000-0000-C000-000000000046}#4.6#0"; "crystl32.ocx"
Begin VB.Form Frm_shoufei_wei
Caption = "未交费清单"
ClientHeight = 5550
ClientLeft = 60
ClientTop = 345
ClientWidth = 7080
Icon = "Frm_shoufei_wei.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5550
ScaleWidth = 7080
WindowState = 2 'Maximized
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 0
Top = 0
Width = 7080
_ExtentX = 12488
_ExtentY = 1005
ButtonWidth = 820
ButtonHeight = 953
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 4
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷新"
Key = "renovate"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.Visible = 0 'False
Caption = "收费"
Key = "add"
ImageIndex = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "print"
ImageIndex = 9
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "exit"
ImageIndex = 7
EndProperty
EndProperty
Begin MSComctlLib.ImageList ImageList1
Left = 5760
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 9
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0442
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":059C
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":06F6
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0850
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":09AA
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0B04
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0C5E
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0DB8
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_shoufei_wei.frx":0E9A
Key = ""
EndProperty
EndProperty
End
Begin VB.Frame Frame1
BorderStyle = 0 'None
Caption = "Frame1"
Height = 375
Left = 2640
TabIndex = 1
Top = 120
Width = 615
End
Begin Crystal.CrystalReport CrystalReport1
Left = 5160
Top = 60
_ExtentX = 741
_ExtentY = 741
_Version = 262150
End
End
Begin MSComctlLib.ListView ListView1
Height = 4875
Left = 0
TabIndex = 2
Top = 600
Width = 7095
_ExtentX = 12515
_ExtentY = 8599
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "ImageList1"
SmallIcons = "ImageList1"
ColHdrIcons = "ImageList1"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 8
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "房号"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "业主"
Object.Width = 2011
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "身份证号"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "职业"
Object.Width = 2117
EndProperty
BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 4
Text = "电话"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Alignment = 1
SubItemIndex = 5
Text = "应交费用"
Object.Width = 1764
EndProperty
BeginProperty ColumnHeader(7) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 6
Text = "抄表员"
Object.Width = 1764
EndProperty
BeginProperty ColumnHeader(8) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 7
Text = "抄表日期"
Object.Width = 1940
EndProperty
End
End
Attribute VB_Name = "Frm_shoufei_wei"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Resize()
If Me.Height > 1000 Then ListView1.Height = Me.Height - 1000
If Me.Width > 120 Then ListView1.Width = Me.Width - 120
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "renovate"
renovate
Case "add"
If ListView1.ListItems.Count = 0 Then Exit Sub
If Val(ListView1.SelectedItem.SubItems(12)) + Val(ListView1.SelectedItem.SubItems(14)) <= Val(ListView1.SelectedItem.SubItems(13)) Then
MsgBox "已完成收费!", vbExclamation, "提示"
Exit Sub
End If
Frm_shoufei_ae.Show 1
Case "print"
If ListView1.ListItems.Count = 0 Then Exit Sub
PrintReport
Case "exit"
Unload Me
End Select
End Sub
Private Sub PrintReport()
If Printers.Count = 0 Then
MsgBox "没有打印机,不能打印!", vbExclamation, "提示"
Exit Sub
End If
Dim cn As ADODB.Connection
Dim rst As New ADODB.Recordset
Dim dbfile As String
Set cn = New ADODB.Connection
cn.ConnectionTimeout = 180
cn.CommandTimeout = 180
dbfile = App.Path & "\report\report.mdb"
cn.CursorLocation = adUseClient
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbfile & "; Persist Security Info=False"
cn.Open
cn.Execute "delete from wjf"
rst.Open "select * from wjf", cn, 3, 3
For i = 1 To ListView1.ListItems.Count
rst.AddNew
rst!fh = Trim(ListView1.ListItems(i).Text)
rst!xm = Trim(ListView1.ListItems(i).SubItems(1))
rst!sfz = Trim(ListView1.ListItems(i).SubItems(2))
rst!zy = Trim(ListView1.ListItems(i).SubItems(3))
rst!dh = Trim(ListView1.ListItems(i).SubItems(4))
rst!yj = Trim(ListView1.ListItems(i).SubItems(5))
rst!cby = Trim(ListView1.ListItems(i).SubItems(6))
rst!cbrq = Trim(ListView1.ListItems(i).SubItems(7))
rst.Update
Next i
rst.Close
cn.Close
CrystalReport1.DataFiles(0) = App.Path & "\Report\report.mdb"
CrystalReport1.ReportFileName = App.Path & "\Report\wjf.rpt"
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
End Sub
Private Sub renovate()
On Error GoTo myerr
Text1 = ""
Dim cn As ADODB.Connection
Dim rst As New ADODB.Recordset
Dim lt As ListItem
ListView1.ListItems.Clear
Set cn = GetCn
rst.Open "select c.fh,b.xm,b.sfz,b.zy,b.dh,a.yj,a.cby,a.cbrq from (jiaofei a inner join yezhu b on a.fid=b.fid) inner join fangchan c on b.fid=c.id where sj=0 order by 1", cn, 0, 1
If rst.BOF And rst.EOF Then Exit Sub
Do While Not rst.EOF
Set lt = ListView1.ListItems.Add(, , rst(0), 8, 8)
For i = 1 To rst.Fields.Count - 1
lt.SubItems(i) = Trim(rst(i) & "")
Next i
rst.MoveNext
Loop
rst.Close
cn.Close
Exit Sub
myerr:
Select Case Err
Case -2147217904
If rst.State = 1 Then rst.Close
rst.Open "select count(*) from jiaofei", cn, 0, 1
If rst(0) = 0 Then
Exit Sub
Else
MsgBox Error, vbExclamation, "提示"
End If
Case Else
MsgBox Error, vbExclamation, "提示"
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -