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

📄 frm_supply_query.frm

📁 前些年帮人写的毕业设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_Supply_Query 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "供应商信息管理"
   ClientHeight    =   2025
   ClientLeft      =   4635
   ClientTop       =   2835
   ClientWidth     =   3330
   Icon            =   "Frm_Supply_Query.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2025
   ScaleWidth      =   3330
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   1920
      TabIndex        =   5
      Top             =   1380
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   300
      TabIndex        =   4
      Top             =   1380
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   330
      Left            =   1140
      TabIndex        =   3
      Top             =   720
      Width           =   1995
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1140
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   180
      Width           =   1995
   End
   Begin VB.Label Label2 
      Caption         =   "查询内容"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   780
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   " 查询条件"
      Height          =   195
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   915
   End
End
Attribute VB_Name = "Frm_Supply_Query"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    On Error GoTo myerr
    Dim cn As ADODB.Connection
    Dim rst As New ADODB.Recordset
    Dim lt As ListItem
    Set cn = GetCn
    
    Select Case Combo1
        Case "简称"
            Combo1.Tag = "short"
        Case "全称"
            Combo1.Tag = "name"
        Case "法人"
            Combo1.Tag = "first_man"
        Case "联系人"
            Combo1.Tag = "link_man"
    End Select
    rst.Open "select short_name,name,first_man,link_man,phone,addrs,supply_id from supply where stop=0 and " & Combo1.Tag & " like '%" & Trim(Text1) & "%' order by supply_id", cn, 0, 1
    If rst.BOF And rst.EOF Then Exit Sub
    Do While rst.EOF
        Set lt = Frm_Supply.ListView1.ListItems.Add(, , rst(0), 8, 8)
        For I = 1 To rst.Fields.Count - 1
            lt.SubItems(I) = Trim(rst(I) & "")
        Next I
        rst.MoveNext
    Loop
    rst.Close
    cn.Close
    Unload Me
    Exit Sub
myerr:
    MsgBox Error, vbExclamation, "提示"
    
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Combo1.Clear
    Combo1.AddItem "简称"
    Combo1.AddItem "全称"
    Combo1.AddItem "法人"
    Combo1.AddItem "联系人"
    Combo1.ListIndex = 0
    
End Sub

⌨️ 快捷键说明

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