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

📄 pdsp.frm

📁 关于图书销售管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form pdsp 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "查找商品"
   ClientHeight    =   3180
   ClientLeft      =   5385
   ClientTop       =   2595
   ClientWidth     =   4770
   Icon            =   "pdsp.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3180
   ScaleWidth      =   4770
   Begin VB.Frame Frame4 
      Height          =   3135
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4695
      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            =   3360
         TabIndex        =   8
         Top             =   2280
         Width           =   1095
      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            =   2160
         TabIndex        =   7
         Top             =   2280
         Width           =   1095
      End
      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          =   975
         Left            =   2160
         TabIndex        =   5
         Top             =   360
         Width           =   2415
         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        =   6
            Top             =   360
            Width           =   1935
         End
      End
      Begin VB.Frame Frame5 
         Caption         =   "选择查询条件"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   2775
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   1815
         Begin VB.OptionButton Option2 
            Caption         =   "商品类别"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00000000&
            Height          =   255
            Left            =   240
            TabIndex        =   4
            Top             =   1800
            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           =   1
            Left            =   240
            TabIndex        =   3
            Top             =   1200
            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            =   240
            TabIndex        =   2
            Top             =   600
            Width           =   1335
         End
      End
   End
End
Attribute VB_Name = "pdsp"
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(3).Value = True Then oIndex = 3
  '查找职员
    Select Case oIndex
          Case 0
               pandiancx.Data2.RecordSource = "select * from kcpd where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
               pandiancx.Data1.Recordset.FindFirst "spbh" & " = '" & Trim(Text1.Text) & "'"
               tmdw = pandiancx.Data1.Recordset("dw")
          Case 1
               pandiancx.Data1.Recordset.FindFirst "spmc" & " = '" & Trim(Text1.Text) & "'"
               tmdw = pandiancx.Data1.Recordset("dw")
               tmbh = Left(pandiancx.Data1.Recordset("spbh"), 1)
               pandiancx.Data2.RecordSource = "select * from kcpd where " & "spbh  like '" & tmbh & "*" & "'"
         
    '     Case 2
     '          pandiancx.Data2.RecordSource = "select * from kcpd where " & "ghs" & " = '" & Trim(Text1.Text) & "'"
         Case 3
                  'spxx.Data1.RecordSource = "select * from zyzl where " & "szbm" & " = '" & Trim(Text1.Text) & "'"
             pandiancx.Data2.RecordSource = "select * from kcpd where " & " spbh  like  '" & Left(Text1.Text, 1) & "*" & "'"

   End Select

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

End Sub

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


⌨️ 快捷键说明

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