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

📄 czsp1.frm

📁 关于图书销售管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form czsp1 
   Caption         =   "查找商品"
   ClientHeight    =   2490
   ClientLeft      =   3990
   ClientTop       =   2940
   ClientWidth     =   4845
   Icon            =   "czsp1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2490
   ScaleWidth      =   4845
   Begin VB.Frame Frame2 
      Height          =   2415
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4815
      Begin VB.Frame Frame3 
         Caption         =   "查询内容"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   855
         Left            =   2400
         TabIndex        =   7
         Top             =   360
         Width           =   2175
         Begin VB.TextBox Text1 
            BackColor       =   &H00FFFFFF&
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   375
            Left            =   240
            TabIndex        =   8
            Top             =   360
            Width           =   1695
         End
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定(&O)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2280
         TabIndex        =   6
         Top             =   1560
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取消(&C)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3600
         TabIndex        =   5
         Top             =   1560
         Width           =   1095
      End
      Begin VB.Frame Frame1 
         Caption         =   "查询主题"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   2055
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   2055
         Begin VB.OptionButton Option1 
            Caption         =   "供货单位"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Index           =   2
            Left            =   360
            TabIndex        =   4
            Top             =   1440
            Width           =   1455
         End
         Begin VB.OptionButton Option1 
            Caption         =   "商品名称"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Index           =   1
            Left            =   360
            TabIndex        =   3
            Top             =   960
            Width           =   1335
         End
         Begin VB.OptionButton Option1 
            Caption         =   "编号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Index           =   0
            Left            =   360
            TabIndex        =   2
            Top             =   480
            Width           =   855
         End
      End
   End
End
Attribute VB_Name = "czsp1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public a As Integer
Private Sub Command1_Click()
   Dim oIndex As Integer
   If Option1(0).Value = True Then oIndex = 0
   If Option1(1).Value = True Then oIndex = 1
   'If Option2.Value = True Then oIndex = 3
   If Option1(2).Value = True Then oIndex = 3
  '查找职员
    Select Case oIndex
          Case 0
               spck.Data2.RecordSource = "select * from kczk where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
               spck.Data1.Recordset.FindFirst "spbh" & " = '" & Trim(Text1.Text) & "'"
               tmdw = spck.Data1.Recordset("dw")
          Case 1
               spck.Data1.Recordset.FindFirst "spmc" & " = '" & Trim(Text1.Text) & "'"
               tmdw = spck.Data1.Recordset("dw")
               tmbh = Left(spck.Data1.Recordset("spbh"), 1)
               spck.Data2.RecordSource = "select * from kczk where " & "spbh  like '" & tmbh & "*" & "'"
         
    '     Case 2
     '          spck.Data2.RecordSource = "select * from kczk where " & "ghs" & " = '" & Trim(Text1.Text) & "'"
         Case 3
                  'spxx.Data1.RecordSource = "select * from zyzl where " & "szbm" & " = '" & Trim(Text1.Text) & "'"
             spck.Data2.RecordSource = "select * from kczk where " & " spbh  like  '" & Left(Text1.Text, 1) & "*" & "'"

   End Select

         Unload Me
         spck.Data2.Refresh
         'zyxx.Data1.Recordset.MoveFirst
      
        
   If spck.Data2.Recordset.BOF = True Then
                MsgBox "没有找到符合条件的记录。", vbInformation, "提示"
             
                spck.Data2.RecordSource = "select * from kczk"
                
                spck.Show
                Unload Me
         Else
                 spck.Data2.Recordset.MoveLast
                incount = spck.Data2.Recordset.RecordCount
              spck.Data2.Recordset.MoveFirst
           For i = 1 To incount
                zl = zl + spck.Data2.Recordset("kcsl")
                spck.Data2.Recordset.MoveNext
           Next
           spck.StatusBar1.Panels(1) = "此种商品共有 " & zl & tmdw
            spck.Data2.Recordset.MoveFirst
               spck.Show
 End If

End Sub

Private Sub Command2_Click()
spck.Data2.RecordSource = "select * from kczk"
spck.Data2.Refresh
spck.Show
Unload Me
End Sub

⌨️ 快捷键说明

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