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

📄 商品月进销存条件查询.frm

📁 采用VB+SQL开发
💻 FRM
字号:
VERSION 5.00
Begin VB.Form search3 
   Caption         =   "商品月进销存条件查询"
   ClientHeight    =   4200
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8595
   Icon            =   "商品月进销存条件查询.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4200
   ScaleWidth      =   8595
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      Caption         =   "查询条件"
      Height          =   3165
      Left            =   120
      TabIndex        =   11
      Top             =   900
      Width           =   8295
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   585
         Left            =   7110
         TabIndex        =   28
         Top             =   1470
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   615
         Left            =   7110
         TabIndex        =   27
         Top             =   510
         Width           =   1215
      End
      Begin VB.ComboBox Combo5 
         Height          =   300
         ItemData        =   "商品月进销存条件查询.frx":08CA
         Left            =   2040
         List            =   "商品月进销存条件查询.frx":08D4
         TabIndex        =   26
         Text            =   "联销"
         Top             =   2010
         Width           =   2775
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Index           =   3
         Left            =   2040
         TabIndex        =   25
         Top             =   2610
         Width           =   4515
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Index           =   2
         Left            =   2040
         TabIndex        =   24
         Top             =   1440
         Width           =   4515
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Index           =   1
         Left            =   2040
         TabIndex        =   23
         Top             =   900
         Width           =   4515
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Index           =   0
         Left            =   2040
         TabIndex        =   22
         Top             =   360
         Width           =   4515
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Check1"
         Height          =   315
         Index           =   4
         Left            =   210
         TabIndex        =   16
         Top             =   2580
         Width           =   195
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Check1"
         Height          =   315
         Index           =   3
         Left            =   210
         TabIndex        =   15
         Top             =   2010
         Width           =   195
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Check1"
         Height          =   315
         Index           =   2
         Left            =   210
         TabIndex        =   14
         Top             =   1440
         Width           =   195
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Check1"
         Height          =   315
         Index           =   1
         Left            =   210
         TabIndex        =   13
         Top             =   930
         Width           =   195
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Check1"
         Height          =   315
         Index           =   0
         Left            =   210
         TabIndex        =   12
         Top             =   360
         Width           =   195
      End
      Begin VB.Label Label7 
         Caption         =   "商品货号:"
         Height          =   315
         Index           =   4
         Left            =   810
         TabIndex        =   21
         Top             =   2670
         Width           =   945
      End
      Begin VB.Label Label7 
         Caption         =   "商品经营方式:"
         Height          =   315
         Index           =   3
         Left            =   720
         TabIndex        =   20
         Top             =   2070
         Width           =   1515
      End
      Begin VB.Label Label7 
         Caption         =   "供应商编码:"
         Height          =   315
         Index           =   2
         Left            =   660
         TabIndex        =   19
         Top             =   1500
         Width           =   1515
      End
      Begin VB.Label Label7 
         Caption         =   "  商品编码:"
         Height          =   315
         Index           =   1
         Left            =   660
         TabIndex        =   18
         Top             =   990
         Width           =   1515
      End
      Begin VB.Label Label7 
         Caption         =   "连锁店编码:"
         Height          =   315
         Index           =   0
         Left            =   660
         TabIndex        =   17
         Top             =   420
         Width           =   1515
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "日期范围"
      Height          =   735
      Left            =   60
      TabIndex        =   0
      Top             =   90
      Width           =   8265
      Begin VB.ComboBox Combo4 
         Height          =   300
         Left            =   6630
         TabIndex        =   10
         Text            =   "Combo4"
         Top             =   240
         Width           =   675
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Left            =   5190
         TabIndex        =   9
         Text            =   "Combo3"
         Top             =   240
         Width           =   765
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   2220
         TabIndex        =   8
         Text            =   "Combo2"
         Top             =   240
         Width           =   585
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1050
         TabIndex        =   7
         Text            =   "Combo1"
         Top             =   240
         Width           =   645
      End
      Begin VB.Label Label6 
         Caption         =   "期"
         Height          =   285
         Left            =   7290
         TabIndex        =   6
         Top             =   300
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "年   第"
         Height          =   315
         Left            =   5970
         TabIndex        =   5
         Top             =   300
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "结朿期:"
         Height          =   315
         Left            =   4500
         TabIndex        =   4
         Top             =   300
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "期"
         Height          =   285
         Left            =   2820
         TabIndex        =   3
         Top             =   300
         Width           =   795
      End
      Begin VB.Label Label2 
         Caption         =   "年  第"
         Height          =   285
         Left            =   1650
         TabIndex        =   2
         Top             =   300
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "起始日期:"
         Height          =   285
         Left            =   180
         TabIndex        =   1
         Top             =   300
         Width           =   1215
      End
   End
End
Attribute VB_Name = "search3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
 Dim txtSQL(0 To 4) As String
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    Static miCount As Integer
    'ToDo: create test for correct password
    'check for correct password
     Dim h As Integer
        Dim v As Integer
       For h = 0 To 3
       If Trim(Text1(h).Text) = "" Then
       v = v + 1
       End If
       Next h
       If v = 4 Then
       MsgBox "没有选择查询条件!"
       Exit Sub
       End If
    If Check1(0).Value = 1 Then
        txtSQL(0) = "select * from 数据存取表 where 连锁店编码 ='" & Text1(0).Text & "'"
        Set mrc = ExecuteSQL(txtSQL(0), MsgText)
        If mrc.EOF = True Then
            MsgBox "没有连锁店加盟!", vbOKOnly + vbExclamation, "警告"
           
        
        End If
       
    End If
    If Check1(1).Value = 1 Then
    txtSQL(1) = "select * from 数据存取表 where 商品编码 = '" & Text1(1).Text & "'"
        Set mrc = ExecuteSQL(txtSQL(1), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有商品!", vbOKOnly + vbExclamation, "警告"
            End If
       End If
        If Check1(2).Value = 1 Then
    txtSQL(2) = "select * from 数据存取表 where  供应商编码= '" & Text1(2).Text & "'"
        Set mrc = ExecuteSQL(txtSQL(2), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有商品!", vbOKOnly + vbExclamation, "警告"
            End If
       End If
        If Check1(3).Value = 1 Then
    txtSQL(3) = "select * from数据存取表 where  商品经营方式= '" & Text1(3).Text & "'"
        Set mrc = ExecuteSQL(txtSQL(3), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有商品!", vbOKOnly + vbExclamation, "警告"
            End If
       End If
        If Check1(4).Value = 1 Then
    txtSQL(4) = "select * from 数据存取表 where  商品货号='" & Text1(4).Text & "'"
        Set mrc = ExecuteSQL(txtSQL(4), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有商品!", vbOKOnly + vbExclamation, "警告"
            End If
       End If
       
      
       sqlresult3.txtSQL = txtSQL(0) & txtSQL(1) & txtSQL(2) & txtSQL(3) & txtSQL(4)
       sqlresult3.Show
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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