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

📄 frmmaterlist2.frm

📁 VB物资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmMaterList2 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "物资余额查询"
   ClientHeight    =   2016
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2016
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.CheckBox chkItem 
      Caption         =   "Check1"
      Height          =   180
      Index           =   2
      Left            =   240
      TabIndex        =   10
      TabStop         =   0   'False
      Top             =   1200
      Width           =   255
   End
   Begin VB.TextBox txtItem 
      Height          =   270
      Index           =   2
      Left            =   1680
      TabIndex        =   9
      Top             =   1200
      Width           =   2655
   End
   Begin VB.CheckBox chkItem 
      Caption         =   "Check1"
      Height          =   180
      Index           =   1
      Left            =   240
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   720
      Width           =   255
   End
   Begin VB.CheckBox chkItem 
      Caption         =   "Check1"
      Height          =   180
      Index           =   0
      Left            =   240
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   240
      Value           =   1  'Checked
      Width           =   255
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定 (&O)"
      Default         =   -1  'True
      Height          =   375
      Left            =   960
      TabIndex        =   2
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "取消 (&X)"
      Height          =   375
      Left            =   2400
      TabIndex        =   3
      Top             =   1560
      Width           =   1215
   End
   Begin VB.TextBox txtItem 
      Height          =   270
      Index           =   1
      Left            =   1680
      TabIndex        =   1
      Top             =   720
      Width           =   2655
   End
   Begin VB.TextBox txtItem 
      Height          =   270
      Index           =   0
      Left            =   1680
      TabIndex        =   0
      Top             =   240
      Width           =   2655
   End
   Begin VB.Label lblitem 
      Caption         =   "仓    库:"
      Height          =   255
      Index           =   2
      Left            =   600
      TabIndex        =   8
      Top             =   1200
      Width           =   1095
   End
   Begin VB.Label lblitem 
      Caption         =   "规格型号:"
      Height          =   255
      Index           =   1
      Left            =   600
      TabIndex        =   5
      Top             =   720
      Width           =   1095
   End
   Begin VB.Label lblitem 
      Caption         =   "物资名称:"
      Height          =   255
      Index           =   0
      Left            =   600
      TabIndex        =   4
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "frmMaterList2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public sQSql As String

Private Sub cmdExit_Click()
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    If chkItem(0).Value = vbChecked Then
        sQSql = " yename ='" & Trim(txtItem(0) & " ") & "'"
    End If
    
    If chkItem(1).Value = vbChecked Then
        If Trim(sQSql & " ") = "" Then
            sQSql = " yespec = '" & Trim(txtItem(1) & " ") & "'"
        Else
            sQSql = sQSql & " and yespec = '" & Trim(txtItem(1) & " ") & "'"
        End If
    End If
    
    If chkItem(2).Value = vbChecked Then
        If Trim(sQSql & " ") = "" Then
            sQSql = " yebase = '" & Trim(txtItem(2) & " ") & "'"
        Else
            sQSql = sQSql & " and yebase = '" & Trim(txtItem(2) & " ") & "'"
        End If
    End If
    
    If Trim(sQSql) = "" Then
        MsgBox "请设置查询方式!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
    Else
        If flagLedit Then
            Unload frmMaterList
        End If
        frmMaterList.txtSQL = "select * from msurplus where" & sQSql
        frmMaterList.Show
    End If
    
    
    Me.Hide
End Sub

Private Sub Form_Load()
    sQSql = ""
End Sub

Private Sub lblitem_Click(Index As Integer)
    chkItem(Index).Value = vbChecked
    txtItem(Index).SetFocus
End Sub

Private Sub chkItem_Click(Index As Integer)
    txtItem(Index).SetFocus
End Sub



Private Sub txtItem_GotFocus(Index As Integer)
    
    txtItem(Index).SelStart = 0
    txtItem(Index).SelLength = Len(txtItem(Index))
End Sub

⌨️ 快捷键说明

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