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

📄 frmrptdetuse.frm

📁 库存管理系统,有详细的代码,就是没论文.VB+ACCE
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmRptDetUse 
   Caption         =   "部门领用明细表设置"
   ClientHeight    =   3300
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5700
   Icon            =   "FrmRptDetUse.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3300
   ScaleWidth      =   5700
   Begin MSComDlg.CommonDialog ComDlgRpt 
      Left            =   2640
      Top             =   1440
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton CmdRpt 
      Caption         =   "退出(&X)"
      Height          =   375
      Index           =   3
      Left            =   4320
      TabIndex        =   16
      Top             =   2520
      Width           =   1155
   End
   Begin VB.CommandButton CmdRpt 
      Caption         =   "生成报表(&T)"
      Enabled         =   0   'False
      Height          =   375
      Index           =   2
      Left            =   2820
      TabIndex        =   15
      Top             =   2520
      Width           =   1155
   End
   Begin VB.CommandButton CmdRpt 
      Caption         =   "导出报表(&E)"
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   4320
      TabIndex        =   14
      Top             =   1920
      Width           =   1155
   End
   Begin VB.CommandButton CmdRpt 
      Caption         =   "打印设置(&P)"
      Enabled         =   0   'False
      Height          =   375
      Index           =   0
      Left            =   2820
      TabIndex        =   13
      Top             =   1920
      Width           =   1155
   End
   Begin VB.Frame Frame1 
      Caption         =   "报表日期"
      Height          =   675
      Index           =   2
      Left            =   2520
      TabIndex        =   6
      Top             =   720
      Width           =   3135
      Begin VB.TextBox TxtDay 
         Height          =   300
         Left            =   2040
         MaxLength       =   2
         TabIndex        =   12
         Top             =   240
         Width           =   315
      End
      Begin VB.TextBox TxtMonth 
         Height          =   300
         Left            =   1380
         MaxLength       =   2
         TabIndex        =   11
         Top             =   240
         Width           =   315
      End
      Begin VB.TextBox TxtYear 
         Height          =   300
         Left            =   540
         MaxLength       =   4
         TabIndex        =   10
         Top             =   240
         Width           =   495
      End
      Begin VB.Label Label1 
         Caption         =   "日"
         Height          =   195
         Index           =   2
         Left            =   2400
         TabIndex        =   9
         Top             =   300
         Width           =   195
      End
      Begin VB.Label Label1 
         Caption         =   "月"
         Height          =   195
         Index           =   1
         Left            =   1800
         TabIndex        =   8
         Top             =   300
         Width           =   195
      End
      Begin VB.Label Label1 
         Caption         =   "年"
         Height          =   195
         Index           =   0
         Left            =   1140
         TabIndex        =   7
         Top             =   300
         Width           =   195
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "报表类别"
      Height          =   675
      Index           =   1
      Left            =   2520
      TabIndex        =   2
      Top             =   0
      Width           =   3135
      Begin VB.OptionButton OptRptType 
         Caption         =   "年报"
         Height          =   195
         Index           =   2
         Left            =   2220
         TabIndex        =   5
         Top             =   300
         Width           =   855
      End
      Begin VB.OptionButton OptRptType 
         Caption         =   "月报"
         Height          =   195
         Index           =   1
         Left            =   1260
         TabIndex        =   4
         Top             =   300
         Width           =   855
      End
      Begin VB.OptionButton OptRptType 
         Caption         =   "日报"
         Height          =   195
         Index           =   0
         Left            =   300
         TabIndex        =   3
         Top             =   300
         Value           =   -1  'True
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "物品类别"
      Height          =   3255
      Index           =   0
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   2475
      Begin MSDataListLib.DataList DLtProType 
         Bindings        =   "FrmRptDetUse.frx":0442
         Height          =   3000
         Left            =   60
         TabIndex        =   1
         Top             =   180
         Width           =   2355
         _ExtentX        =   4154
         _ExtentY        =   5292
         _Version        =   393216
         ListField       =   "type_name"
         BoundColumn     =   "type_id"
         Object.DataMember      =   "ComProType"
      End
   End
End
Attribute VB_Name = "FrmRptDetUse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private cmDetUse As ADODB.Command
Private rsRpt As ADODB.Recordset
Private rsDepartment As ADODB.Recordset
Private rsExpDetUse As ADODB.Recordset
Private strRptCap As String
Private strRptDte As String
Private strRptTyp As String

Private Sub CmdRpt_Click(Index As Integer)
    Dim strSQL As String
    Select Case Index
        Case 0
            ComDlgRpt.ShowPrinter
        Case 1
            If TxtDay.Enabled = False Then TxtDay.Text = ""
            If TxtMonth.Enabled = False Then TxtMonth.Text = ""
            If DateIsTrue(TxtYear.Text, TxtMonth.Text, TxtDay.Text) Then
                Call DetUse_Rpt
                If Dir(App.Path & "\xls\detuserpt.xls") <> "" Then
                    Kill App.Path & "\xls\detuserpt.xls"
                End If
                strSQL = "select * into [Excel 8.0;database=" & App.Path & _
                "\xls\detuserpt.xls].detuse from temp_detuse"
                rsExpDetUse.Open strSQL, DEjxc.Conjxc, adOpenStatic, adLockOptimistic
                'rsExpDetUse.Close
                MsgBox "文件输出到" & App.Path & "\xls\detuserpt.xls", vbInformation, "输出完毕"
                strSQL = "drop table temp_detuse"
                cmDetUse.CommandText = strSQL
                cmDetUse.Execute
            Else
                MsgBox "日期错误或大于系统启用日期!", vbCritical, "报表输出错误"
            End If
        Case 2
            If TxtDay.Enabled = False Then TxtDay.Text = ""
            If TxtMonth.Enabled = False Then TxtMonth.Text = ""
            If DateIsTrue(TxtYear.Text, TxtMonth.Text, TxtDay.Text) Then
                Call DetUse_Rpt
                RptJxc.Show
            Else
                MsgBox "日期错误或大于系统启用日期!", vbCritical, "报表生成错误"
            End If
        Case 3
            Unload Me
    End Select
End Sub

Private Sub DLtProType_Click()
    If Me.DLtProType.BoundText <> "" Then
        CmdRpt(1).Enabled = True
        'CmdRpt(2).Enabled = True
        strRptTyp = Me.DLtProType.Text
    End If
End Sub

Private Sub Form_Load()
    intNumWindows = OpenWindow(intNumWindows)

⌨️ 快捷键说明

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