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

📄 main_stat.frm

📁 vb 用于做数据库的 关于稿费的发放的系统 vb 用于做数据库的 关于稿费的发放的系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Main_Stat 
   BackColor       =   &H00FF8080&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "稿费信息统计"
   ClientHeight    =   4815
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10785
   Icon            =   "Main_Stat.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "Main_Stat.frx":000C
   ScaleHeight     =   4815
   ScaleWidth      =   10785
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   345
      Left            =   -285
      Top             =   2160
      Visible         =   0   'False
      Width           =   2355
      _ExtentX        =   4154
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   "sa"
      Password        =   ""
      RecordSource    =   "select * from 刊物信息表"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   345
      Left            =   -300
      Top             =   1875
      Visible         =   0   'False
      Width           =   2250
      _ExtentX        =   3969
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   "sa"
      Password        =   ""
      RecordSource    =   "select * from 稿费发放表"
      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 VB.CheckBox Check2 
      Height          =   195
      Left            =   4830
      TabIndex        =   14
      Top             =   330
      Width           =   195
   End
   Begin VB.CheckBox Check1 
      Height          =   195
      Left            =   360
      TabIndex        =   13
      Top             =   300
      Width           =   195
   End
   Begin MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "Main_Stat.frx":15F950
      Height          =   330
      Left            =   2085
      TabIndex        =   12
      Top             =   255
      Width           =   2445
      _ExtentX        =   4313
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "刊物名称"
      Text            =   ""
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MS1 
      Bindings        =   "Main_Stat.frx":15F965
      Height          =   2835
      Left            =   150
      TabIndex        =   11
      Top             =   1215
      Width           =   10485
      _ExtentX        =   18494
      _ExtentY        =   5001
      _Version        =   393216
      BackColorFixed  =   16761024
      BackColorBkg    =   14725311
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
   Begin VB.CommandButton CmdEnd 
      BackColor       =   &H00E0B0BF&
      Caption         =   "退出"
      Height          =   390
      Left            =   8400
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   4230
      Width           =   2055
   End
   Begin VB.CommandButton CmdStat 
      BackColor       =   &H00E0B0BF&
      Caption         =   "汇总"
      Height          =   390
      Left            =   6090
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   4230
      Width           =   2055
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "Main_Stat.frx":15F97A
      Left            =   2085
      List            =   "Main_Stat.frx":15F97C
      TabIndex        =   3
      Top             =   675
      Width           =   2445
   End
   Begin MSComCtl2.DTPicker DtpDateS 
      Height          =   330
      Left            =   7590
      TabIndex        =   5
      Top             =   240
      Width           =   2820
      _ExtentX        =   4974
      _ExtentY        =   582
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Format          =   20185089
      CurrentDate     =   36549
   End
   Begin MSComCtl2.DTPicker DtpDateE 
      Height          =   330
      Left            =   7590
      TabIndex        =   6
      Top             =   675
      Width           =   2820
      _ExtentX        =   4974
      _ExtentY        =   582
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Format          =   20185089
      CurrentDate     =   36640
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "刊物设定:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   225
      Width           =   1530
   End
   Begin VB.Shape Shape3 
      Height          =   585
      Left            =   6000
      Top             =   4125
      Width           =   4620
   End
   Begin VB.Shape Shape2 
      Height          =   585
      Left            =   135
      Top             =   4125
      Width           =   5880
   End
   Begin VB.Shape Shape1 
      Height          =   1035
      Left            =   165
      Top             =   90
      Width           =   10440
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "汇总设置:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   615
      TabIndex        =   8
      Top             =   630
      Width           =   1515
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "设置汇总时间段:             至"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   750
      Left            =   5070
      TabIndex        =   7
      Top             =   255
      Width           =   2520
   End
   Begin VB.Label LblRecordCount 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   885
      TabIndex        =   1
      Top             =   4320
      Width           =   1305
   End
   Begin VB.Label LblMoney 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   3075
      TabIndex        =   0
      Top             =   4320
      Width           =   2490
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "记录数:               汇总金额:                             元"
      Height          =   210
      Left            =   255
      TabIndex        =   2
      Top             =   4335
      Width           =   5700
   End
End
Attribute VB_Name = "Main_Stat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myval As Currency
Private Sub Form_Activate()
  Combo1.Text = "刊物名称"
  DtpDateS.Value = Date - 10
  DtpDateE.Value = Date
  MS1.ColWidth(0) = 12 * 25 * 1.15
  MS1.ColWidth(1) = 12 * 25 * 8
  MS1.ColWidth(2) = 12 * 25 * 6
  MS1.ColWidth(3) = 12 * 25 * 8
  MS1.ColWidth(4) = 12 * 25 * 8
  MS1.ColWidth(5) = 12 * 25 * 8
  MS1.ColWidth(6) = 12 * 25 * 8
  MS1.ColWidth(7) = 12 * 25 * 8
  MS1.ColWidth(8) = 12 * 25 * 8
  MS1.ColWidth(9) = 12 * 25 * 8
  MS1.TextMatrix(0, 0) = "xh"
  myval = 0
  If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
  For i = 1 To Adodc1.Recordset.RecordCount
      myval = Val(Adodc1.Recordset.Fields("金额")) + myval
      MS1.TextMatrix(i, 0) = i
      If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveNext
  Next i
  LblMoney.Caption = Format(myval, "0.00")
  LblRecordCount.Caption = Adodc1.Recordset.RecordCount
End Sub
Private Sub Form_Load()
  Combo1.AddItem ("刊物名称")
  Combo1.AddItem ("年")
  Combo1.AddItem ("期")
  Combo1.AddItem ("刊物名称, 年")
  Combo1.AddItem ("刊物名称, 年, 期")
  Combo1.AddItem ("姓名, 刊物名称, 期")
  Combo1.AddItem ("姓名, 刊物名称, 年, 期")
  Combo1.ListIndex = 0
End Sub
Private Sub CmdStat_Click()
  myval = 0
  If Check1.Value = 1 And Check2.Value = 1 Then
      Adodc1.RecordSource = "select " & Combo1.Text & " ," & "sum(金额)as 稿费汇总 from 稿费发放表  where 日期 between '" + Str(DtpDateS.Value) + "'AND '" + Str(DtpDateE.Value) + "'and 刊物名称 like +'" + DataCombo1.Text + "'group by " & Combo1.Text
      Adodc1.Refresh
  End If
  
  If Check1.Value = 1 And Check2.Value = 0 Then
     Adodc1.RecordSource = "select " & Combo1.Text & " ," & "sum(金额)as 稿费汇总 from 稿费发放表  where 刊物名称 like + '" + DataCombo1.Text + "'group by " & Combo1.Text
     Adodc1.Refresh
  End If
  
  If Check1.Value = 0 And Check2.Value = 1 Then
     Adodc1.RecordSource = "select " & Combo1.Text & " ," & "sum(金额)as 稿费汇总 from 稿费发放表 where 日期 between '" + Str(DtpDateS.Value) + "'AND '" + Str(DtpDateE.Value) + "'group by " & Combo1.Text
     Adodc1.Refresh
  End If
  
  If Check1.Value = 0 And Check2.Value = 0 Then
     Adodc1.RecordSource = "select " & Combo1.Text & " ," & "sum(金额)as 稿费汇总 from 稿费发放表 group by " & Combo1.Text
     Adodc1.Refresh
  End If
  If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
  If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
  For i = 1 To Adodc1.Recordset.RecordCount
      myval = Val(Adodc1.Recordset.Fields("稿费汇总")) + myval
      MS1.TextMatrix(i, 0) = i
      If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveNext
  Next i
  LblMoney.Caption = Format(myval, "0.00")
  LblRecordCount.Caption = Adodc1.Recordset.RecordCount
End Sub
Private Sub CmdEnd_Click()
  Frm_Main.Show
  Unload Me
End Sub



⌨️ 快捷键说明

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