⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmcollectlabel.frm

📁 本人用VB 6.0和ACCESS编写的水费管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmCollectLabel 
   Caption         =   "汇总标签"
   ClientHeight    =   6345
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8925
   Icon            =   "frmCollectLabel.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6345
   ScaleWidth      =   8925
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdPrint 
      Caption         =   "打印(&P)"
      Default         =   -1  'True
      Height          =   375
      Left            =   2775
      TabIndex        =   5
      Top             =   5760
      Width           =   1215
   End
   Begin MSDBGrid.DBGrid DBGrid 
      Bindings        =   "frmCollectLabel.frx":0442
      Height          =   4095
      Left            =   315
      OleObjectBlob   =   "frmCollectLabel.frx":0455
      TabIndex        =   4
      Top             =   840
      Width           =   8295
   End
   Begin VB.Data Data 
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   1035
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   5160
      Width           =   6855
   End
   Begin VB.CommandButton cmdExit 
      Cancel          =   -1  'True
      Caption         =   "退出(&X)"
      Height          =   375
      Left            =   4935
      TabIndex        =   6
      Top             =   5760
      Width           =   1215
   End
   Begin VB.TextBox txtEnd 
      Height          =   375
      Left            =   6255
      TabIndex        =   3
      Top             =   240
      Width           =   1815
   End
   Begin VB.TextBox txtBegin 
      Height          =   375
      Left            =   2415
      TabIndex        =   1
      Top             =   240
      Width           =   1815
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "终止发票号:"
      Height          =   180
      Left            =   5160
      TabIndex        =   2
      Top             =   330
      Width           =   990
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "起始发票号:"
      Height          =   180
      Left            =   1200
      TabIndex        =   0
      Top             =   330
      Width           =   990
   End
End
Attribute VB_Name = "frmCollectLabel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim strSQL As String

Private Sub cmdExit_Click()
    Unload Me
End Sub

Private Sub cmdPrint_Click()
    Me.PrintForm
    Printer.EndDoc
End Sub

Private Sub Data_Reposition()
    Data.Caption = "记录:" & Data.Recordset.AbsolutePosition + 1
End Sub

Private Sub Form_Load()
    Dim strAppName As String
    strAppName = App.Path & "\Main" & Year(Now) & Month(Now) & ".mdb"
    Data.DatabaseName = strAppName
    strSQL = "select 发票号,编号,实用水量,水费,污水处理费,合计金额 from 主库文件"
    Data.RecordSource = strSQL
    Data.Refresh
End Sub

Private Sub txtEnd_LostFocus()
    If (Not IsNumeric(txtBegin)) Or (Not IsNumeric(txtEnd)) Then
        MsgBox "输入错误!", vbExclamation + vbOKOnly, "汇总标签"
        txtBegin.SetFocus
        SendKeys "{Home}+{End}"
        Exit Sub
    End If
    Dim lngBegin As Long, lngEnd As Long
    lngBegin = Val(txtBegin): lngEnd = Val(txtEnd)
    strSQL = "select 发票号,编号,实用水量,水费,污水处理费,合计金额 from 主库文件 " _
        & "where 发票号>=" & lngBegin & " and 发票号<=" & lngEnd
    Data.RecordSource = strSQL
    Data.Refresh
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -