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

📄 frm_kctj.frm

📁 近期学习中的采购管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm_kctj 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "库存信息统计"
   ClientHeight    =   1590
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6870
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1590
   ScaleWidth      =   6870
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   1600
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   6855
      Begin VB.Frame Frame2 
         Caption         =   "按除日期外的信息统计"
         ForeColor       =   &H00C000C0&
         Height          =   615
         Left            =   120
         TabIndex        =   7
         Top             =   200
         Width           =   6615
         Begin VB.ComboBox Combo1 
            Height          =   300
            ItemData        =   "frm_kctj.frx":0000
            Left            =   120
            List            =   "frm_kctj.frx":0016
            Style           =   2  'Dropdown List
            TabIndex        =   12
            Top             =   200
            Width           =   1575
         End
         Begin VB.ComboBox Combo2 
            Height          =   300
            ItemData        =   "frm_kctj.frx":0046
            Left            =   1800
            List            =   "frm_kctj.frx":005C
            Style           =   2  'Dropdown List
            TabIndex        =   11
            Top             =   200
            Width           =   855
         End
         Begin VB.TextBox Text1 
            Height          =   300
            Left            =   2760
            TabIndex        =   10
            Top             =   200
            Width           =   1815
         End
         Begin VB.CommandButton Command1 
            Caption         =   "统计"
            Height          =   350
            Left            =   4680
            TabIndex        =   9
            Top             =   200
            Width           =   855
         End
         Begin VB.CommandButton Command3 
            Caption         =   "取消"
            Height          =   350
            Left            =   5640
            TabIndex        =   8
            Top             =   200
            Width           =   855
         End
      End
      Begin VB.Frame Frame3 
         Caption         =   "按日期统计"
         ForeColor       =   &H00C000C0&
         Height          =   615
         Left            =   120
         TabIndex        =   1
         Top             =   900
         Width           =   6615
         Begin VB.ComboBox Combo3 
            Height          =   300
            ItemData        =   "frm_kctj.frx":007D
            Left            =   120
            List            =   "frm_kctj.frx":008A
            Style           =   2  'Dropdown List
            TabIndex        =   6
            Top             =   200
            Width           =   1575
         End
         Begin VB.ComboBox Combo4 
            Height          =   300
            ItemData        =   "frm_kctj.frx":00AC
            Left            =   1800
            List            =   "frm_kctj.frx":00C2
            Style           =   2  'Dropdown List
            TabIndex        =   5
            Top             =   200
            Width           =   855
         End
         Begin VB.CommandButton Command2 
            Caption         =   "统计"
            Height          =   350
            Left            =   4680
            TabIndex        =   3
            Top             =   200
            Width           =   855
         End
         Begin VB.CommandButton Command4 
            Caption         =   "取消"
            Height          =   350
            Left            =   5640
            TabIndex        =   2
            Top             =   200
            Width           =   855
         End
         Begin MSComCtl2.DTPicker DT1 
            Height          =   300
            Left            =   2760
            TabIndex        =   4
            Top             =   195
            Width           =   1815
            _ExtentX        =   3201
            _ExtentY        =   529
            _Version        =   393216
            Format          =   54657025
            CurrentDate     =   38245
         End
      End
   End
End
Attribute VB_Name = "frm_kctj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, a

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub

Private Sub Combo2_Click()
If Combo2.Text <> " Like" Then
i = 0
ElseIf Combo2.Text = " Like" Then
i = 1
Else
End If
Text1.SetFocus
End Sub

Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text1.SetFocus
Else
End If
End Sub

Private Sub Combo3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo4.SetFocus
Else
End If
End Sub

Private Sub Combo4_Click()
If Combo4.Text <> " Like" Then
i = 0
ElseIf Combo4.Text = " Like" Then
i = 1
Else
End If
Text1.SetFocus
End Sub

Private Sub Combo4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DT1.SetFocus
Else
End If
End Sub

Private Sub Command1_Click()
If Combo1.Text = "" Or Combo2.Text = "" Or Text1.Text = "" Then
MsgBox "输入或选择的内容不能为空值", 48, "采购管理系统"
ElseIf Combo1.Text = "数量" Or Combo1.Text = "单号" Or Combo1.Text = "货物编号" Then
    If Not IsNumeric(Text1.Text) Then
    Text1.Text = ""
    Text1.SetFocus
    Else
    a = Text1.Text
       If i = 0 Then
       DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo1.Text + " " + Combo2.Text + " '" + a + "'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
       ElseIf i = 1 Then
       DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo1.Text + " like '%" + a + "%'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
       Else
       End If
    End If
Else
    a = Text1.Text
       If i = 0 Then
       DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo1.Text + " " + Combo2.Text + " '" + a + "'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
       ElseIf i = 1 Then

       DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo1.Text + " like '%" + a + "%'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
       Else
       End If
End If
End Sub

Private Sub Command2_Click()
If Combo3.Text = "" Or Combo4.Text = "" Then
MsgBox "输入或选择的内容不能为空值", 48, "采购管理系统"
Else
a = DT1.Value
If i = 0 Then
DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo3.Text + " " + Combo4.Text + " '" + Str(a) + "'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
ElseIf i = 1 Then
DataEnvironment1.rsCom_kcxx.Open "select * from Table_kcb where " + Combo3.Text + " like '%" + Str(a) + "%'"
          If DataEnvironment1.rsCom_kcxx.RecordCount > 0 Then
          DataRep_kcxx.Show
          Else
          DataEnvironment1.rsCom_kcxx.Close
          MsgBox "没有相关的统计信息"
          End If
Else
End If
End If
End Sub

Private Sub Command3_Click()
Combo1.SetFocus
Text1.Text = ""
End Sub

Private Sub Command4_Click()
Combo3.SetFocus
End Sub

Private Sub DT1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command2_Click
Else
End If
End Sub

Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
DT1.Value = Date
frm_main.StatusBar1.Panels(1).Text = " 当前操作: " & Me.Caption
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
  frm_main.StatusBar1.Panels(1).Text = " 吉林省明日科技有限公司"
End Sub

⌨️ 快捷键说明

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