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

📄 frmslist.frm

📁 家庭理财系统,使用VB6.0编写,相当不错,可以用于课程设计
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmSList 
   Caption         =   "日常收支统计"
   ClientHeight    =   6930
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5580
   LinkTopic       =   "Form1"
   ScaleHeight     =   6930
   ScaleWidth      =   5580
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   240
      Top             =   6360
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      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            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   5535
      Left            =   360
      TabIndex        =   5
      Top             =   600
      Width           =   4815
      _ExtentX        =   8493
      _ExtentY        =   9763
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         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     =   2
      BeginProperty Column00 
         DataField       =   ""
         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       =   ""
         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
      EndProperty
   End
   Begin VB.CommandButton Cmd_Back 
      Caption         =   "返 回"
      Height          =   495
      Left            =   1920
      TabIndex        =   4
      Top             =   6240
      Width           =   1215
   End
   Begin VB.ComboBox cob_Month 
      Height          =   300
      Left            =   3840
      Style           =   2  'Dropdown List
      TabIndex        =   3
      Top             =   180
      Width           =   615
   End
   Begin VB.ComboBox cob_Year 
      Height          =   300
      Left            =   1200
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   180
      Width           =   1095
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "选择月份"
      Height          =   180
      Left            =   3000
      TabIndex        =   1
      Top             =   240
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "选择年份"
      Height          =   180
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   720
   End
End
Attribute VB_Name = "FrmSList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Back_Click()
  Unload Me
End Sub



Private Sub cob_Month_Click()
  DataRefresh
End Sub

Private Sub cob_Year_Click()
  DataRefresh
End Sub

Private Sub Form_Load()
  Dim StrDate As String
  StrDate = Str(Year(Date))
  cob_Year.AddItem Str(Year(Date) - 1), 0
  cob_Year.AddItem Str(Year(Date)), 1
  cob_Year.AddItem Str(Year(Date) + 1), 2
  cob_Year.ListIndex = 1
  
  cob_Month.AddItem "", 0
  cob_Month.AddItem "1", 1
  cob_Month.AddItem "2", 2
  cob_Month.AddItem "3", 3
  cob_Month.AddItem "4", 4
  cob_Month.AddItem "5", 5
  cob_Month.AddItem "6", 6
  cob_Month.AddItem "7", 7
  cob_Month.AddItem "8", 8
  cob_Month.AddItem "9", 9
  cob_Month.AddItem "10", 10
  cob_Month.AddItem "11", 11
  cob_Month.AddItem "12", 12
  cob_Month.ListIndex = Month(Date)
  DataRefresh
End Sub
Private Sub DataRefresh()
  Dim StrSch As String
  Dim TmpSource As String
  Dim StrDate1 As String
  Dim StrDate2 As String
  If cob_Month.ListIndex > 0 Then  '如果月份大于0,则开始日期为本月1日
    StrDate1 = Trim(cob_Year.Text) + "-" + Trim(cob_Month.ListIndex) + "-01"
    If cob_Month.ListIndex = 12 Then  '如果月份为12,则结束日期为下一年度1月1日
      StrDate2 = Trim(Val(cob_Year.Text) + 1) + "-01-01"
    Else
      StrDate2 = Trim(cob_Year.Text) + "-" + Trim(cob_Month.ListIndex + 1) + "-01"
    End If
    StrSch = " And l.UseDate>=#" + StrDate1 + "# And l.UseDate<#" + StrDate2 + "#"
  Else
    StrDate1 = Trim(cob_Year.Text) + "-01-01"
    StrDate2 = Trim(cob_Year.Text) + "-12-31"
    StrSch = " And l.UseDate>=#" + StrDate1 + "# And l.UseDate<=#" + StrDate2 + "#"
  End If
  TmpSource = "Select t.TypeName AS 收支分类,SUM(l.UseSum) AS 收支金额" _
    + " From InOutList l,Types t Where l.TypeId=t.TypeId " + StrSch _
    + " Group By l.TypeId,t.TypeName,l.Flag Order By l.Flag"
 ' MsgBox TmpSource
  Adodc1.ConnectionString = Conn
  Adodc1.RecordSource = TmpSource
  Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1
  DataGrid1.Columns(0).Width = 1600
  DataGrid1.Columns(1).Width = 2000
End Sub

⌨️ 快捷键说明

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