📄 frmreport.vb
字号:
Option Strict Off
Option Explicit On
Friend Class frmreport
Inherits System.Windows.Forms.Form
#Region "Windows 窗体设计器生成的代码"
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
'对于启动窗体,所创建的第一个实例为默认实例。
If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
End If
Catch
End Try
End If
End If
'此调用是 Windows 窗体设计器所必需的。
InitializeComponent()
End Sub
'窗体重写处置,以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents dbcbo_kind As System.Windows.Forms.ComboBox
Public WithEvents cmdexit As System.Windows.Forms.Button
Public WithEvents cmdprint As System.Windows.Forms.Button
Public WithEvents cmdpreview As System.Windows.Forms.Button
Public WithEvents optall As System.Windows.Forms.RadioButton
Public WithEvents optmonth As System.Windows.Forms.RadioButton
Public WithEvents optkind As System.Windows.Forms.RadioButton
Public WithEvents cboday As System.Windows.Forms.ComboBox
Public WithEvents cbomonth As System.Windows.Forms.ComboBox
Public WithEvents txtyear As System.Windows.Forms.TextBox
Public WithEvents Label3 As System.Windows.Forms.Label
Public WithEvents Label2 As System.Windows.Forms.Label
Public WithEvents Label1 As System.Windows.Forms.Label
Public WithEvents Frame1 As System.Windows.Forms.GroupBox
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器来修改它。
'不要使用代码编辑器修改它。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmreport))
Me.components = New System.ComponentModel.Container()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
Me.ToolTip1.Active = True
Me.dbcbo_kind = New System.Windows.Forms.ComboBox
Me.cmdexit = New System.Windows.Forms.Button
Me.cmdprint = New System.Windows.Forms.Button
Me.cmdpreview = New System.Windows.Forms.Button
Me.Frame1 = New System.Windows.Forms.GroupBox
Me.optall = New System.Windows.Forms.RadioButton
Me.optmonth = New System.Windows.Forms.RadioButton
Me.optkind = New System.Windows.Forms.RadioButton
Me.cboday = New System.Windows.Forms.ComboBox
Me.cbomonth = New System.Windows.Forms.ComboBox
Me.txtyear = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Text = "报表"
Me.ClientSize = New System.Drawing.Size(287, 202)
Me.Location = New System.Drawing.Point(3, 22)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.SystemColors.Control
Me.ControlBox = True
Me.Enabled = True
Me.KeyPreview = False
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ShowInTaskbar = True
Me.HelpButton = False
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
Me.Name = "frmreport"
Me.dbcbo_kind.Size = New System.Drawing.Size(113, 20)
Me.dbcbo_kind.Location = New System.Drawing.Point(112, 104)
Me.dbcbo_kind.TabIndex = 6
Me.dbcbo_kind.BackColor = System.Drawing.SystemColors.Window
Me.dbcbo_kind.CausesValidation = True
Me.dbcbo_kind.Enabled = True
Me.dbcbo_kind.ForeColor = System.Drawing.SystemColors.WindowText
Me.dbcbo_kind.IntegralHeight = True
Me.dbcbo_kind.Cursor = System.Windows.Forms.Cursors.Default
Me.dbcbo_kind.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.dbcbo_kind.Sorted = False
Me.dbcbo_kind.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
Me.dbcbo_kind.TabStop = True
Me.dbcbo_kind.Visible = True
Me.dbcbo_kind.Name = "dbcbo_kind"
Me.cmdexit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdexit.Text = "退出"
Me.cmdexit.Size = New System.Drawing.Size(73, 33)
Me.cmdexit.Location = New System.Drawing.Point(200, 160)
Me.cmdexit.TabIndex = 5
Me.cmdexit.BackColor = System.Drawing.SystemColors.Control
Me.cmdexit.CausesValidation = True
Me.cmdexit.Enabled = True
Me.cmdexit.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdexit.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdexit.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdexit.TabStop = True
Me.cmdexit.Name = "cmdexit"
Me.cmdprint.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdprint.Text = "打印"
Me.cmdprint.Size = New System.Drawing.Size(73, 33)
Me.cmdprint.Location = New System.Drawing.Point(100, 160)
Me.cmdprint.TabIndex = 4
Me.cmdprint.BackColor = System.Drawing.SystemColors.Control
Me.cmdprint.CausesValidation = True
Me.cmdprint.Enabled = True
Me.cmdprint.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdprint.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdprint.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdprint.TabStop = True
Me.cmdprint.Name = "cmdprint"
Me.cmdpreview.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdpreview.Text = "预览"
Me.cmdpreview.Size = New System.Drawing.Size(81, 33)
Me.cmdpreview.Location = New System.Drawing.Point(8, 160)
Me.cmdpreview.TabIndex = 3
Me.cmdpreview.BackColor = System.Drawing.SystemColors.Control
Me.cmdpreview.CausesValidation = True
Me.cmdpreview.Enabled = True
Me.cmdpreview.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdpreview.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdpreview.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdpreview.TabStop = True
Me.cmdpreview.Name = "cmdpreview"
Me.Frame1.Text = "选择报表类型"
Me.Frame1.Size = New System.Drawing.Size(281, 145)
Me.Frame1.Location = New System.Drawing.Point(0, 0)
Me.Frame1.TabIndex = 0
Me.Frame1.BackColor = System.Drawing.SystemColors.Control
Me.Frame1.Enabled = True
Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Frame1.Visible = True
Me.Frame1.Name = "Frame1"
Me.optall.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optall.Text = "所有开支报表"
Me.optall.Size = New System.Drawing.Size(97, 12)
Me.optall.Location = New System.Drawing.Point(16, 16)
Me.optall.TabIndex = 13
Me.optall.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optall.BackColor = System.Drawing.SystemColors.Control
Me.optall.CausesValidation = True
Me.optall.Enabled = True
Me.optall.ForeColor = System.Drawing.SystemColors.ControlText
Me.optall.Cursor = System.Windows.Forms.Cursors.Default
Me.optall.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.optall.Appearance = System.Windows.Forms.Appearance.Normal
Me.optall.TabStop = True
Me.optall.Checked = False
Me.optall.Visible = True
Me.optall.Name = "optall"
Me.optmonth.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optmonth.Text = "开支月报表"
Me.optmonth.Size = New System.Drawing.Size(81, 17)
Me.optmonth.Location = New System.Drawing.Point(16, 56)
Me.optmonth.TabIndex = 12
Me.optmonth.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optmonth.BackColor = System.Drawing.SystemColors.Control
Me.optmonth.CausesValidation = True
Me.optmonth.Enabled = True
Me.optmonth.ForeColor = System.Drawing.SystemColors.ControlText
Me.optmonth.Cursor = System.Windows.Forms.Cursors.Default
Me.optmonth.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.optmonth.Appearance = System.Windows.Forms.Appearance.Normal
Me.optmonth.TabStop = True
Me.optmonth.Checked = False
Me.optmonth.Visible = True
Me.optmonth.Name = "optmonth"
Me.optkind.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optkind.Text = "分类开支报表"
Me.optkind.Size = New System.Drawing.Size(97, 12)
Me.optkind.Location = New System.Drawing.Point(16, 112)
Me.optkind.TabIndex = 11
Me.optkind.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.optkind.BackColor = System.Drawing.SystemColors.Control
Me.optkind.CausesValidation = True
Me.optkind.Enabled = True
Me.optkind.ForeColor = System.Drawing.SystemColors.ControlText
Me.optkind.Cursor = System.Windows.Forms.Cursors.Default
Me.optkind.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.optkind.Appearance = System.Windows.Forms.Appearance.Normal
Me.optkind.TabStop = True
Me.optkind.Checked = False
Me.optkind.Visible = True
Me.optkind.Name = "optkind"
Me.cboday.Size = New System.Drawing.Size(41, 20)
Me.cboday.Location = New System.Drawing.Point(232, 56)
Me.cboday.Items.AddRange(New Object(){"30", "31", "28"})
Me.cboday.TabIndex = 7
Me.cboday.Text = "30"
Me.cboday.Visible = False
Me.cboday.BackColor = System.Drawing.SystemColors.Window
Me.cboday.CausesValidation = True
Me.cboday.Enabled = True
Me.cboday.ForeColor = System.Drawing.SystemColors.WindowText
Me.cboday.IntegralHeight = True
Me.cboday.Cursor = System.Windows.Forms.Cursors.Default
Me.cboday.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cboday.Sorted = False
Me.cboday.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
Me.cboday.TabStop = True
Me.cboday.Name = "cboday"
Me.cbomonth.Size = New System.Drawing.Size(41, 20)
Me.cbomonth.Location = New System.Drawing.Point(184, 56)
Me.cbomonth.Items.AddRange(New Object(){"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"})
Me.cbomonth.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cbomonth.TabIndex = 2
Me.cbomonth.BackColor = System.Drawing.SystemColors.Window
Me.cbomonth.CausesValidation = True
Me.cbomonth.Enabled = True
Me.cbomonth.ForeColor = System.Drawing.SystemColors.WindowText
Me.cbomonth.IntegralHeight = True
Me.cbomonth.Cursor = System.Windows.Forms.Cursors.Default
Me.cbomonth.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cbomonth.Sorted = False
Me.cbomonth.TabStop = True
Me.cbomonth.Visible = True
Me.cbomonth.Name = "cbomonth"
Me.txtyear.AutoSize = False
Me.txtyear.Size = New System.Drawing.Size(65, 18)
Me.txtyear.Location = New System.Drawing.Point(112, 56)
Me.txtyear.TabIndex = 1
Me.txtyear.AcceptsReturn = True
Me.txtyear.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.txtyear.BackColor = System.Drawing.SystemColors.Window
Me.txtyear.CausesValidation = True
Me.txtyear.Enabled = True
Me.txtyear.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtyear.HideSelection = True
Me.txtyear.ReadOnly = False
Me.txtyear.Maxlength = 0
Me.txtyear.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtyear.MultiLine = False
Me.txtyear.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtyear.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.txtyear.TabStop = True
Me.txtyear.Visible = True
Me.txtyear.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.txtyear.Name = "txtyear"
Me.Label3.Text = "该月天数"
Me.Label3.Size = New System.Drawing.Size(49, 17)
Me.Label3.Location = New System.Drawing.Point(232, 40)
Me.Label3.TabIndex = 10
Me.Label3.Visible = False
Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.Label3.BackColor = System.Drawing.SystemColors.Control
Me.Label3.Enabled = True
Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label3.UseMnemonic = True
Me.Label3.AutoSize = False
Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.Label3.Name = "Label3"
Me.Label2.Text = "月"
Me.Label2.Size = New System.Drawing.Size(17, 17)
Me.Label2.Location = New System.Drawing.Point(200, 40)
Me.Label2.TabIndex = 9
Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.Label2.BackColor = System.Drawing.SystemColors.Control
Me.Label2.Enabled = True
Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label2.UseMnemonic = True
Me.Label2.Visible = True
Me.Label2.AutoSize = False
Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.Label2.Name = "Label2"
Me.Label1.Text = "年"
Me.Label1.Size = New System.Drawing.Size(17, 17)
Me.Label1.Location = New System.Drawing.Point(136, 40)
Me.Label1.TabIndex = 8
Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.Label1.BackColor = System.Drawing.SystemColors.Control
Me.Label1.Enabled = True
Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label1.UseMnemonic = True
Me.Label1.Visible = True
Me.Label1.AutoSize = False
Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.Label1.Name = "Label1"
Me.Controls.Add(dbcbo_kind)
Me.Controls.Add(cmdexit)
Me.Controls.Add(cmdprint)
Me.Controls.Add(cmdpreview)
Me.Controls.Add(Frame1)
Me.Frame1.Controls.Add(optall)
Me.Frame1.Controls.Add(optmonth)
Me.Frame1.Controls.Add(optkind)
Me.Frame1.Controls.Add(cboday)
Me.Frame1.Controls.Add(cbomonth)
Me.Frame1.Controls.Add(txtyear)
Me.Frame1.Controls.Add(Label3)
Me.Frame1.Controls.Add(Label2)
Me.Frame1.Controls.Add(Label1)
End Sub
#End Region
#Region "升级支持"
Private Shared m_vb6FormDefInstance As frmreport
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As frmreport
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New frmreport()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
Public Sub rptmonth()
Dim report As Object
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim rst1 As DAO.Recordset
Dim sql As String
db = DAODBEngine_definst.OpenDatabase("d:\data\payout")
rst1 = db.OpenRecordset("select * from payout_report")
On Error GoTo kk
If rst1.RecordCount > 0 Then
rst1.MoveFirst()
Do Until rst1.EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -