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

📄 frm0102.frm

📁 便利店管理系统 VB+ACCESS 附上数据库和源码
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frm0102 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "销售报表"
   ClientHeight    =   2550
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5295
   Icon            =   "frm0102.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2550
   ScaleWidth      =   5295
   Begin VB.Frame fraOp 
      Caption         =   "选项"
      Height          =   1635
      Left            =   180
      TabIndex        =   2
      Top             =   180
      Width           =   4935
      Begin MSComCtl2.DTPicker dtpDate 
         Height          =   315
         Index           =   0
         Left            =   1440
         TabIndex        =   6
         Top             =   1020
         Width           =   1395
         _ExtentX        =   2461
         _ExtentY        =   556
         _Version        =   393216
         Format          =   23789569
         CurrentDate     =   37290
      End
      Begin VB.OptionButton opOP 
         Caption         =   "上周"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   3
         Top             =   300
         Width           =   1155
      End
      Begin MSComCtl2.DTPicker dtpDate 
         Height          =   315
         Index           =   1
         Left            =   3180
         TabIndex        =   7
         Top             =   1020
         Width           =   1395
         _ExtentX        =   2461
         _ExtentY        =   556
         _Version        =   393216
         Format          =   23789569
         CurrentDate     =   37290
      End
      Begin VB.OptionButton opOP 
         Caption         =   "上月"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   4
         Top             =   660
         Width           =   1155
      End
      Begin VB.OptionButton opOP 
         Caption         =   "范围"
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   5
         Top             =   1020
         Width           =   1155
      End
      Begin VB.Line Line1 
         X1              =   2880
         X2              =   3120
         Y1              =   1140
         Y2              =   1140
      End
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   435
      Left            =   2880
      TabIndex        =   1
      Top             =   1980
      Width           =   1635
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   435
      Left            =   780
      TabIndex        =   0
      Top             =   1980
      Width           =   1635
   End
End
Attribute VB_Name = "frm0102"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim opFlag1 As Integer
Dim dateBegin, dateEnd As Date

Private Sub LoadFormLang()
    Me.Caption = getFormCaptionResource("0102")
    
    Me.fraOp.Caption = getResource("resOption")
    Me.opOP(0).Caption = getResource("resLabF0101001")
    Me.opOP(1).Caption = getResource("resLabF0101002")
    Me.opOP(2).Caption = getResource("resLabF0101003")
    
    Me.cmdOK.Caption = getResource("resOK")
    Me.cmdCancel.Caption = getResource("resCancel")
End Sub


Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    Select Case opFlag1
    Case 1:
        dateBegin = getWeek(Date).wSun
        dateEnd = getWeek(Date).wSat
    Case 2:
        dateEnd = Date - Day(Now())
        dateBegin = dateEnd - Day(dateEnd) + 1
    Case 3:
        dateBegin = Me.dtpDate(0).Value
        dateEnd = Me.dtpDate(1).Value
        If dateEnd - dateBegin < 0 Then
            MsgBox getResource("resMsgF0101001"), vbCritical + vbOKOnly
            Exit Sub
        End If
    End Select
    
    myDE.rsrsExPortRP.Requery
    myDE.rsrsExPortRP.Filter = "opDate >= #" & dateBegin & " 0:0:0# AND opDate <= #" & dateEnd & " 23:59:59#"
    If myDE.rsrsExPortRP.RecordCount = 0 Then
        MsgBox getResource("resMsgF0000007"), vbCritical + vbOKOnly
    Else
        Unload Me
        
        If curLang = "E" Then
            rpSaleE.Show
            rpSaleE.ZOrder 0
        Else
            rpSaleC.Show
            rpSaleC.ZOrder 0
        End If
    End If
    'MsgBox dateBegin & ":" & dateEnd
End Sub

Private Sub Form_Load()
    opFlag1 = 0
    Call LoadFormLang
    
    Me.dtpDate(0).Value = Date
    Me.dtpDate(1).Value = Date
    
    Call opOP_Click(0)
End Sub

Private Sub opOP_Click(Index As Integer)
    opOP(Index).Value = True
    opFlag1 = Index + 1
    If Index < 2 Then
        Me.dtpDate(0).Enabled = False
        Me.dtpDate(1).Enabled = False
    
    Else
        Me.dtpDate(0).Enabled = True
        Me.dtpDate(1).Enabled = True
    
    End If
End Sub

⌨️ 快捷键说明

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