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

📄 frm_outstemperspecbill_find.frm

📁 一个公司的客户财产管理系统vb源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_OutStemperSpecBill_Find 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "外卖母盘规格单信息查找"
   ClientHeight    =   5130
   ClientLeft      =   5655
   ClientTop       =   4320
   ClientWidth     =   8280
   Icon            =   "Frm_OutStemperSpecBill_Find.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5130
   ScaleWidth      =   8280
   Begin VB.Frame Frame1 
      Height          =   4935
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   8055
      Begin VB.CommandButton Cmd_Find 
         Caption         =   "查询(&F)"
         Height          =   375
         Left            =   2640
         TabIndex        =   10
         Top             =   4320
         Width           =   1215
      End
      Begin VB.CommandButton Cmd_Exit 
         Caption         =   "退出(&X)"
         Height          =   375
         Left            =   4320
         TabIndex        =   9
         Top             =   4320
         Width           =   1215
      End
      Begin VB.ComboBox Cob_Fields 
         Height          =   300
         Left            =   255
         Style           =   2  'Dropdown List
         TabIndex        =   8
         Top             =   600
         Width           =   2295
      End
      Begin VB.TextBox Txt_Condition 
         Height          =   300
         Left            =   3975
         TabIndex        =   7
         Text            =   "Text1"
         Top             =   600
         Width           =   3840
      End
      Begin VB.ComboBox Cob_Amount_like 
         Height          =   300
         Left            =   2655
         Style           =   2  'Dropdown List
         TabIndex        =   6
         Top             =   600
         Width           =   1200
      End
      Begin VB.TextBox Txt_ConditionAll 
         ForeColor       =   &H00FF0000&
         Height          =   2295
         Left            =   255
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         TabIndex        =   5
         Text            =   "Frm_OutStemperSpecBill_Find.frx":0CCA
         Top             =   1920
         Width           =   7560
      End
      Begin VB.CommandButton Cmd_And 
         Caption         =   "并且(&And)"
         Height          =   375
         Left            =   3855
         TabIndex        =   4
         Top             =   1080
         Width           =   1215
      End
      Begin VB.CommandButton Cmd_Or 
         Caption         =   "或者(&Or)"
         Height          =   375
         Left            =   5175
         TabIndex        =   3
         Top             =   1080
         Width           =   1215
      End
      Begin VB.CommandButton Cmd_Clear 
         Caption         =   "清除(&Clear)"
         Height          =   375
         Left            =   6540
         TabIndex        =   2
         Top             =   1080
         Width           =   1215
      End
      Begin VB.CommandButton Cmd_Add 
         Caption         =   "添加(A&dd)"
         Height          =   375
         Left            =   2535
         TabIndex        =   1
         Top             =   1080
         Width           =   1215
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "选择查询字段"
         Height          =   180
         Left            =   255
         TabIndex        =   14
         Top             =   360
         Width           =   1080
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "查询总条件"
         Height          =   180
         Left            =   255
         TabIndex        =   13
         Top             =   1680
         Width           =   900
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "查询规则"
         Height          =   180
         Left            =   2655
         TabIndex        =   12
         Top             =   360
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "条件值"
         Height          =   180
         Left            =   3975
         TabIndex        =   11
         Top             =   360
         Width           =   540
      End
      Begin VB.Line Line1 
         BorderColor     =   &H00C0FFFF&
         X1              =   240
         X2              =   7800
         Y1              =   1560
         Y2              =   1560
      End
   End
End
Attribute VB_Name = "Frm_OutStemperSpecBill_Find"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_Add_Click()
On Error GoTo err
    If Me.Cob_Amount_like.text = "like" Then
      Me.Txt_ConditionAll.text = Me.Cob_Fields.text & " like '%'+'" & Me.Txt_Condition.text & "'+'%' "
    Else
      Me.Txt_ConditionAll.text = Me.Cob_Fields.text & " = '" & Me.Txt_Condition.text & "'"
    End If
    Me.Cmd_Add.Enabled = False
    Me.Cmd_And.Enabled = True
    Me.Cmd_Or.Enabled = True
Exit Sub
err:
   MsgBox err.Description, vbCritical
   
End Sub

Private Sub Cmd_And_Click()
On Error GoTo err
    If Me.Cob_Amount_like.text = "like" Then
      Me.Txt_ConditionAll.text = Me.Txt_ConditionAll.text & " And " & Me.Cob_Fields.text & " like '%'+'" & Me.Txt_Condition.text & "'+'%' "
    Else
      Me.Txt_ConditionAll.text = Me.Txt_ConditionAll.text & " And " & Me.Cob_Fields.text & " = '" & Me.Txt_Condition.text & "'"
    End If
Exit Sub
err:
   MsgBox err.Description, vbCritical
End Sub

Private Sub Cmd_Clear_Click()
On Error GoTo err
    Me.Txt_ConditionAll.text = ""
    Me.Cmd_Add.Enabled = True
    Me.Cmd_And.Enabled = False
    Me.Cmd_Or.Enabled = False
Exit Sub
err:
   MsgBox err.Description, vbCritical
    
End Sub

Private Sub cmd_Exit_Click()
On Error Resume Next
    Unload Me
End Sub

Private Sub Cmd_Find_Click()
On Error GoTo err

 If Me.Txt_ConditionAll.text = "" Then
   MsgBox "查询条件为空!" + Chr(13) + "请输入后再查询!", vbInformation, "提示信息"
   Exit Sub
 End If
Rs_OutStemperSpecBill.Close
Rs_OutStemperSpecBill.Open "select * from Outstemper_SpecBill where " & Me.Txt_ConditionAll.text & _
           " order by 规格单号", Cn_OutStemperSpecBill, adOpenKeyset, adLockOptimistic, adCmdText
If Rs_OutStemperSpecBill.RecordCount <> 0 Then
'  If Rs_SpecBill.RecordCount <> 0 Then Rs_SpecBill.MoveLast
  Rs_OutStemperSpecBill.MoveLast
  Set Frm_OutWholeStemperSpecBill.TDBGrid_Stemper.DataSource = Rs_OutStemperSpecBill
  Call Frm_OutWholeStemperSpecBill.TDBGrid_Stemper_Width_Set

'      Frm_Whole_SpecBill.StatusBar1.Panels(7).text = "记录总数: " & Str(Rs_SpecBill.RecordCount)
'      Call DGrid_Width_Set(Frm_Whole_SpecBill)
  Unload Me
  Exit Sub
Else
  Rs_OutStemperSpecBill.Close
  Rs_OutStemperSpecBill.Open "select * from Outstemper_SpecBill" & _
             " order by 规格单号", Cn_OutStemperSpecBill, adOpenKeyset, adLockOptimistic, adCmdText
  If Rs_OutStemperSpecBill.RecordCount <> 0 Then Rs_OutStemperSpecBill.MoveLast
  Set Frm_OutWholeStemperSpecBill.TDBGrid_Stemper.DataSource = Rs_OutStemperSpecBill
  Call Frm_OutWholeStemperSpecBill.TDBGrid_Stemper_Width_Set
'      Frm_Whole_SpecBill.StatusBar1.Panels(7).text = "记录总数: " & Str(Rs_SpecBill.RecordCount)
'      Call DGrid_Width_Set(Frm_Whole_SpecBill)
  MsgBox "找不到此记录!", vbInformation, "提示信息"
  Me.Txt_ConditionAll.text = ""
  Me.Cmd_Add.Enabled = True
  Me.Cmd_And.Enabled = False
  Me.Cmd_Or.Enabled = False
  Exit Sub
End If
Exit Sub
err:
  MsgBox err.Description, vbCritical

End Sub

Private Sub Cmd_Or_Click()
On Error GoTo err
      If Me.Cob_Amount_like.text = "like" Then
        Me.Txt_ConditionAll.text = Me.Txt_ConditionAll.text & " Or " & Me.Cob_Fields.text & " like '%'+'" & Me.Txt_Condition.text & "'+'%'"
      Else
        Me.Txt_ConditionAll.text = Me.Txt_ConditionAll.text & " Or " & Me.Cob_Fields.text & " = '" & Me.Txt_Condition.text & "'"
      End If
Exit Sub
err:
   MsgBox err.Description, vbCritical
End Sub

Private Sub Form_Load()
On Error GoTo err
    Me.Cob_Amount_like.AddItem ("like")
    Me.Cob_Amount_like.AddItem ("=")
    Me.Cob_Amount_like.text = "like"
    Me.Cob_Fields.AddItem ("规格单号")
    Me.Cob_Fields.AddItem ("节目名称")
    Me.Cob_Fields.AddItem ("母盘号码")
    Me.Cob_Fields.AddItem ("料号")
    Me.Cob_Fields.AddItem ("客户名称")
    Me.Cob_Fields.AddItem ("节目源种类")
    Me.Cob_Fields.AddItem ("节目种类")
    Me.Cob_Fields.AddItem ("内编码")
    Me.Cob_Fields.AddItem ("母盘刻字要求")
    Me.Cob_Fields.AddItem ("刻录速度")
    Me.Cob_Fields.AddItem ("质量等级")
    Me.Cob_Fields.AddItem ("母盘归属")
    Me.Cob_Fields.AddItem ("订单类型")
    Me.Cob_Fields.AddItem ("数量")
    Me.Cob_Fields.AddItem ("母盘内孔")
    Me.Cob_Fields.AddItem ("节目源状态")
    Me.Cob_Fields.text = "规格单号"
    Me.Txt_Condition.text = ""
    Me.Txt_ConditionAll.text = ""
    Me.Cmd_Add.Enabled = True
    Me.Cmd_And.Enabled = False
    Me.Cmd_Or.Enabled = False
Exit Sub
err:
   MsgBox err.Description, vbCritical
End Sub

⌨️ 快捷键说明

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