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

📄 frmmzcx.frm

📁 是医药卫生综合管理系统的一部分.院长查询管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmmzcx 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "医院门诊情况查询"
   ClientHeight    =   4590
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7905
   Icon            =   "frmmzcx.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "frmmzcx.frx":030A
   ScaleHeight     =   4590
   ScaleWidth      =   7905
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "关闭&(C)"
      Height          =   300
      Left            =   6480
      TabIndex        =   5
      Top             =   4200
      Width           =   1200
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   240
      Top             =   4200
      Width           =   6015
      _ExtentX        =   10610
      _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       =   16711680
      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 MSDataGridLib.DataGrid DataGrid1 
      Height          =   3135
      Left            =   240
      TabIndex        =   4
      Top             =   960
      Width           =   7455
      _ExtentX        =   13150
      _ExtentY        =   5530
      _Version        =   393216
      AllowUpdate     =   0   'False
      BackColor       =   16777215
      DefColWidth     =   67
      ColumnHeaders   =   -1  'True
      ForeColor       =   255
      HeadLines       =   1.5
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "所有数据库记录列表"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox Picture2 
      Height          =   630
      Left            =   240
      Picture         =   "frmmzcx.frx":59F9
      ScaleHeight     =   570
      ScaleWidth      =   4275
      TabIndex        =   3
      Top             =   120
      Width           =   4335
      Begin VB.TextBox Text2 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   2760
         TabIndex        =   7
         Top             =   150
         Width           =   1400
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   960
         TabIndex        =   6
         Top             =   150
         Width           =   1400
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "值"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   2520
         TabIndex        =   9
         Top             =   195
         Width           =   180
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "查询字段"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   120
         TabIndex        =   8
         Top             =   200
         Width           =   720
      End
   End
   Begin VB.PictureBox Picture1 
      Height          =   630
      Left            =   4680
      Picture         =   "frmmzcx.frx":7DDC
      ScaleHeight     =   570
      ScaleWidth      =   2955
      TabIndex        =   0
      Top             =   120
      Width           =   3015
      Begin VB.ComboBox Combo1 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H00FF0000&
         Height          =   300
         ItemData        =   "frmmzcx.frx":A1BF
         Left            =   1080
         List            =   "frmmzcx.frx":A1E4
         TabIndex        =   1
         Top             =   120
         Width           =   1575
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "查询类别"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   165
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmmzcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public cxzd As String
Public Sub Errmsg()
MsgBox "      你可能执行了非法操作!    "
End Sub

Private Sub Combo1_Click()
On Error GoTo err4
Adodc1.Top = 4200
Command1.Top = 4200
frmmzcx.Height = 4970
Text1.Enabled = True
DataGrid1.Visible = True
Select Case Combo1.Text
   Case "门诊药房"
        Adodc1.RecordSource = "select * from yaofang order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
        DataGrid1.Columns(10).Visible = False
    Case "门诊收费"
        Adodc1.RecordSource = "select * from mzsf order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
    Case "药品销售"
        Adodc1.RecordSource = "select * from ypxs order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
    Case "住院部药房"
        Adodc1.RecordSource = "select * from zybyf order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
        DataGrid1.Columns(10).Visible = False
    Case "住院部收费"
        Adodc1.RecordSource = "select * from zyf order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
    Case "医生处方"
        Adodc1.RecordSource = "select * from chufang order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
    Case "医院药品库"
        Adodc1.RecordSource = "select * from kcyp order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
        DataGrid1.Columns(17).Visible = False
    Case "中草药库"
        Adodc1.RecordSource = "select * from caoyao order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
        DataGrid1.Columns(17).Visible = False
    Case "医疗器材库"
        Adodc1.RecordSource = "select * from qixie order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
        DataGrid1.Columns(17).Visible = False
    Case "药品调拨"
        Adodc1.RecordSource = "select * from ypdb order by ID"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
    Case "住院病人"
        Adodc1.RecordSource = "select 住院证号,患者姓名,性别,年龄,地址,病种,科室类别,病房号,床位号,主治大夫,住院日期,出院日期,预交费,费用合计,操作员 from zyf order by 住院证号"
        Adodc1.Refresh
        Set DataGrid1.DataSource = Adodc1
        DataGrid1.Columns(0).Visible = False
End Select
Exit Sub
err4:
Call Errmsg
End Sub

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub DataGrid1_LostFocus()
Text1.Text = cxzd
End Sub

Private Sub DataGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = cxzd
End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
On Error GoTo errcw
cxzd = DataGrid1.Columns(DataGrid1.Col).Caption
Exit Sub
errcw:
Exit Sub
End Sub

Private Sub Form_Load()
On Error GoTo errp
frmmzcx.Top = (frmmain.Height - frmmzcx.Height) / 2 - 500
frmmzcx.Left = (frmmain.Width - frmmzcx.Width) / 2
Adodc1.ConnectionString = frmlogin.conn
Text1.Enabled = False
Text2.Enabled = False
DataGrid1.Visible = False
Adodc1.Top = 890
Command1.Top = 890
frmmzcx.Height = 1700
Adodc1.Caption = "请选择查询部门"
Exit Sub
errp:
MsgBox "数据库连接失败!"
End Sub

Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmmzcx.Caption
End Sub

Private Sub Text1_Change()
If Text1.Text = "" Then
Text2.Enabled = False
Else
Text2.Enabled = True
End If
End Sub

Private Sub Text2_Change()
On Error GoTo err2
With Adodc1
Select Case Combo1.Text
Case "门诊药房"
.RecordSource = "select * from yaofang where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "门诊收费"
.RecordSource = "select * from mzsf where " & Text1.Text & " Like '" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "药品销售"
.RecordSource = "select * from ypxs where " & Text1.Text & " Like '" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "住院部药房"
.RecordSource = "select * from zybyf where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "住院部收费"
.RecordSource = "select * from zyf where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "医生处方"
.RecordSource = "select * from chufang where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "医院药品库"
.RecordSource = "select * from kcyp where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "中草药库"
.RecordSource = "select * from caoyao where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "医疗器材库"
.RecordSource = "select * from qixie where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "药品调拨"
.RecordSource = "select * from ypdb where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "住院病人"
.RecordSource = "select 住院证号,患者姓名,性别,年龄,地址,病种,科室类别,病房号,床位号,主治大夫,住院日期,出院日期,预交费,费用合计,操作员 from zyf where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
End Select
End With
Exit Sub
err2:
MsgBox "输入条件错误或输入值类型不匹配!"
End Sub

Private Sub Text2_GotFocus()
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub

⌨️ 快捷键说明

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