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

📄 frmfind.frm

📁 本系统是医药卫生综合管理系统的一部分.主要针对医药卫生部门的财务进行管理.包括药物的进货价钱,销售价钱,以及医院员工的工资情况.
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmfind 
   BackColor       =   &H00404040&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "多重条件选择"
   ClientHeight    =   1290
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6000
   Icon            =   "frmfind.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "frmfind.frx":030A
   ScaleHeight     =   1290
   ScaleWidth      =   6000
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox Combo2 
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   1080
      TabIndex        =   12
      Top             =   860
      Width           =   1400
   End
   Begin VB.ComboBox Combo1 
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   1080
      TabIndex        =   11
      Top             =   120
      Width           =   1400
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   4680
      Top             =   0
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关闭&(C)"
      Height          =   320
      Left            =   4800
      TabIndex        =   5
      Top             =   720
      Width           =   1000
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   3360
      TabIndex        =   3
      Top             =   860
      Width           =   1200
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H80000008&
      Height          =   300
      Left            =   1680
      ScaleHeight     =   270
      ScaleWidth      =   1920
      TabIndex        =   6
      Top             =   480
      Width           =   1950
      Begin VB.OptionButton Option2 
         BackColor       =   &H00FFFFFF&
         Caption         =   "与"
         ForeColor       =   &H000000FF&
         Height          =   180
         Left            =   1320
         TabIndex        =   2
         Top             =   40
         Width           =   615
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "或"
         ForeColor       =   &H000000FF&
         Height          =   180
         Left            =   120
         TabIndex        =   1
         Top             =   40
         Width           =   735
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查找&(F)"
      Height          =   320
      Left            =   4800
      TabIndex        =   4
      Top             =   285
      Width           =   1000
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   3360
      TabIndex        =   0
      Top             =   120
      Width           =   1200
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "查询字段:"
      Height          =   180
      Left            =   200
      TabIndex        =   10
      Top             =   915
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "查询字段:"
      Height          =   180
      Left            =   200
      TabIndex        =   9
      Top             =   165
      Width           =   900
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "查询值:"
      Height          =   180
      Left            =   2640
      TabIndex        =   8
      Top             =   915
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "查询值:"
      Height          =   180
      Left            =   2640
      TabIndex        =   7
      Top             =   165
      Width           =   720
   End
End
Attribute VB_Name = "frmfind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Change()
If Combo1.Text = "" And Combo2.Text = "" Then
Command1.Enabled = False
Else
Command1.Enabled = True
End If
End Sub
Private Sub Combo2_Change()
If Combo1.Text = "" And Combo2.Text = "" Then
Command1.Enabled = False
Else
Command1.Enabled = True
End If
End Sub

Private Sub Command1_Click()
Dim ysf, tj1, tj2 As String
On Error GoTo err1
If Text1.Text = "" And Text2.Text = "" Then
    MsgBox "条件选择不能同时为空!"
Else
    If Option1.Value = True Then
        ysf = " or "
    Else
        ysf = " and "
    End If
    If Option2.Value = True Then
        ysf = " and "
    Else
        ysf = " or "
    End If
    tj1 = Combo1.Text & " LIKE '" & Text1.Text & "%'"
    tj2 = Combo2.Text & " LIKE '" & Text2.Text & "%'"
    With Adodc1
    If Combo1.Text <> "" And Combo2.Text <> "" Then
        .RecordSource = "select * from " & frmclear.dataku & " where " & tj1 & ysf & tj2
        .Refresh
        If .Recordset.AbsolutePosition <> adPosUnknown Then
            Set frmclear.DataGrid1.DataSource = Adodc1
            frmclear.Command2.Caption = "批量删除"
            frmclear.Command2.Enabled = True
            frmclear.Command5.Enabled = False
        Else
            frmclear.Command2.Enabled = False
            Set frmclear.DataGrid1.DataSource = Adodc1
            MsgBox "没有找到选定范围内的记录!"
        End If
    End If
    End With
    If Combo1.Text = "" And Combo2.Text <> "" Then
    With Adodc1
    .RecordSource = "select * from " & frmclear.dataku & " where " & tj2
        .Refresh
        If .Recordset.AbsolutePosition <> adPosUnknown Then
            Set frmclear.DataGrid1.DataSource = Adodc1
            frmclear.Command2.Caption = "批量删除&(B)"
            frmclear.Command2.Enabled = True
            frmclear.Command5.Enabled = False
        Else
            frmclear.Command2.Enabled = False
            Set frmclear.DataGrid1.DataSource = Adodc1
            MsgBox "没有找到选定范围内的记录!"
        End If
    End With
    End If
    If Combo1.Text <> "" And Combo2.Text = "" Then
    With Adodc1
    .RecordSource = "select * from " & frmclear.dataku & " where " & tj1
        .Refresh
        If .Recordset.AbsolutePosition <> adPosUnknown Then
            Set frmclear.DataGrid1.DataSource = Adodc1
            frmclear.Command2.Caption = "批量删除"
            frmclear.Command2.Enabled = True
            frmclear.Command5.Enabled = False
        Else
            frmclear.Command2.Enabled = False
            Set frmclear.DataGrid1.DataSource = Adodc1
            MsgBox "没有找到选定范围内的记录!"
            End If
    End With
    End If
End If
Command1.Enabled = True
Exit Sub
err1:
MsgBox "数据库中没有值为“" & Combo1.Text & "”或“ " & Combo2.Text & "”的字段!"
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
frmfind.Top = (frmmain.Height - frmfind.Height) / 2 - 500
frmfind.Left = (frmmain.Width - frmfind.Width) / 2
Option1.Value = True
Command1.Enabled = False
frmclear.Command1.Enabled = False
frmclear.Command3.Enabled = False
frmclear.Command5.Enabled = False
Adodc1.ConnectionString = frmlogin.conn
End Sub

Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
frmclear.Command2.Caption = "选择范围&(S)"
frmclear.Command1.Enabled = True
frmclear.Command2.Enabled = True
frmclear.Command3.Enabled = True
frmclear.Command4.Enabled = True
frmclear.Command5.Enabled = True
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmfind.Caption
End Sub

⌨️ 快捷键说明

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