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

📄 frmearningstatistics_select.frm

📁 自来水公司的一个管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmEarningStatistics_Select 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "水费收入统计表选择"
   ClientHeight    =   3300
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4815
   Icon            =   "frmEarningStatistics_Select.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3300
   ScaleWidth      =   4815
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdYes 
      Caption         =   "确认"
      Height          =   420
      Left            =   90
      TabIndex        =   1
      Top             =   2790
      Width           =   1065
   End
   Begin VB.Frame Frame2 
      Caption         =   "报表类型"
      ForeColor       =   &H8000000D&
      Height          =   1515
      Left            =   75
      TabIndex        =   2
      Top             =   1005
      Width           =   4575
      Begin VB.OptionButton optType 
         Caption         =   "私人银行交费用户"
         Height          =   270
         Index           =   2
         Left            =   315
         TabIndex        =   9
         Top             =   990
         Width           =   3165
      End
      Begin VB.OptionButton optType 
         Caption         =   "公家非银行托收用户"
         Height          =   270
         Index           =   1
         Left            =   315
         TabIndex        =   8
         Top             =   630
         Width           =   3165
      End
      Begin VB.OptionButton optType 
         Caption         =   "公家银行托收用户"
         Height          =   270
         Index           =   0
         Left            =   315
         TabIndex        =   7
         Top             =   300
         Value           =   -1  'True
         Width           =   3165
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "报表月份"
      ForeColor       =   &H8000000D&
      Height          =   825
      Left            =   75
      TabIndex        =   0
      Top             =   120
      Width           =   4560
      Begin VB.ComboBox cboMonth 
         Height          =   300
         ItemData        =   "frmEarningStatistics_Select.frx":0442
         Left            =   1890
         List            =   "frmEarningStatistics_Select.frx":0444
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   345
         Width           =   990
      End
      Begin MSMask.MaskEdBox txtYear 
         Height          =   300
         Left            =   360
         TabIndex        =   3
         Top             =   345
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   529
         _Version        =   393216
         MaxLength       =   4
         Mask            =   "9999"
         PromptChar      =   " "
      End
      Begin VB.Label Label1 
         Caption         =   "月份"
         Height          =   210
         Index           =   3
         Left            =   2925
         TabIndex        =   6
         Top             =   405
         Width           =   435
      End
      Begin VB.Label Label1 
         Caption         =   "年"
         Height          =   210
         Index           =   2
         Left            =   1575
         TabIndex        =   5
         Top             =   390
         Width           =   210
      End
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000003&
      Index           =   1
      X1              =   30
      X2              =   4725
      Y1              =   2625
      Y2              =   2625
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000005&
      Index           =   0
      X1              =   30
      X2              =   4710
      Y1              =   2640
      Y2              =   2640
   End
End
Attribute VB_Name = "frmEarningStatistics_Select"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public strReturnYm As String
Public strReturnChargeTypeID As String

Private Sub InitInterFace()
    Me.txtYear.Text = Trim(str(Year(Date)))
    Call FillMonth
    
    Me.optType(0).value = True
End Sub

Private Sub FillMonth()
    Me.cboMonth.Clear
    Me.cboMonth.AddItem ("01")
    Me.cboMonth.AddItem ("02")
    Me.cboMonth.AddItem ("03")
    Me.cboMonth.AddItem ("04")
    Me.cboMonth.AddItem ("05")
    Me.cboMonth.AddItem ("06")
    Me.cboMonth.AddItem ("07")
    Me.cboMonth.AddItem ("08")
    Me.cboMonth.AddItem ("09")
    Me.cboMonth.AddItem ("10")
    Me.cboMonth.AddItem ("11")
    Me.cboMonth.AddItem ("12")
    Me.cboMonth.ListIndex = Month(Date) - 1
End Sub

Private Sub cmdYes_Click()
    strReturnYm = Trim(Me.txtYear.Text) & Me.cboMonth.Text
    If Me.optType(0).value = True Then
        strReturnChargeTypeID = "1"
    ElseIf Me.optType(1).value = True Then
        strReturnChargeTypeID = "2"
    ElseIf Me.optType(2).value = True Then
        strReturnChargeTypeID = "3"
    End If
    
    Unload Me
End Sub

Private Sub Form_Load()
    Call InitInterFace
    strReturnYm = ""
    strReturnChargeTypeID = ""
End Sub

Private Sub txtYear_GotFocus()
    Call AutoSelectText(txtYear)
End Sub

Private Sub txtYear_KeyPress(KeyAscii As Integer)
    Call IfEnterKeyMoveNext(KeyAscii)
End Sub

Private Sub txtYear_LostFocus()
    If Trim(Me.txtYear.Text) = "" Then
        Warning "年份格式错误!"
        Me.txtYear.SetFocus
    End If
    If Val(Me.txtYear.Text) < 1900 Or Val(Me.txtYear.Text) > 9999 Then
        Warning "年份范围错误!"
        Me.txtYear.SetFocus
    End If
End Sub

Private Sub cboMonth_KeyPress(KeyAscii As Integer)
    Call IfEnterKeyMoveNext(KeyAscii)
End Sub

⌨️ 快捷键说明

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