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

📄 科室费用明细查询1.frm

📁 这是一个医院管理系统中的院长查询模块
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmDepartmentMx 
   Caption         =   "科室费用明细查询"
   ClientHeight    =   8205
   ClientLeft      =   -225
   ClientTop       =   585
   ClientWidth     =   11610
   LinkTopic       =   "Form1"
   ScaleHeight     =   8205
   ScaleWidth      =   11610
   Begin VB.CheckBox Check2 
      Caption         =   "Check2"
      Height          =   195
      Left            =   180
      TabIndex        =   12
      Top             =   690
      Width           =   225
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Check1"
      Height          =   180
      Left            =   180
      TabIndex        =   11
      Top             =   210
      Width           =   255
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   1050
      TabIndex        =   9
      Top             =   120
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "门诊浏览"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   8370
      TabIndex        =   8
      Top             =   570
      Width           =   1600
   End
   Begin VB.TextBox txtKs 
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   1050
      TabIndex        =   7
      Top             =   570
      Width           =   1425
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   1  'ODBCCursor
      DefaultType     =   1  'UseODBC
      Exclusive       =   0   'False
      Height          =   525
      Left            =   1530
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   2640
      Visible         =   0   'False
      Width           =   1635
   End
   Begin VB.CommandButton Command1 
      Caption         =   "住院浏览"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   6630
      TabIndex        =   2
      Top             =   570
      Width           =   1600
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退  出 &Q"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   10080
      TabIndex        =   1
      Top             =   570
      Width           =   1600
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "科室费用明细查询1.frx":0000
      Height          =   7275
      Left            =   300
      OleObjectBlob   =   "科室费用明细查询1.frx":0010
      TabIndex        =   0
      Top             =   1230
      Width           =   11490
   End
   Begin MSMask.MaskEdBox txtStart 
      Height          =   405
      Left            =   2760
      TabIndex        =   3
      Top             =   570
      Width           =   1725
      _ExtentX        =   3043
      _ExtentY        =   714
      _Version        =   393216
      BackColor       =   -2147483648
      ForeColor       =   8421376
      MaxLength       =   10
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Mask            =   "####-##-##"
      PromptChar      =   " "
   End
   Begin MSMask.MaskEdBox txtEnd 
      Height          =   405
      Left            =   4860
      TabIndex        =   4
      Top             =   570
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   714
      _Version        =   393216
      BackColor       =   -2147483648
      ForeColor       =   8421376
      MaxLength       =   10
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Mask            =   "####-##-##"
      PromptChar      =   " "
   End
   Begin VB.Label Label3 
      Caption         =   "项目 "
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808000&
      Height          =   315
      Left            =   420
      TabIndex        =   10
      Top             =   150
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "科室"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808000&
      Height          =   315
      Left            =   420
      TabIndex        =   6
      Top             =   630
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "______"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808000&
      Height          =   375
      Left            =   4320
      TabIndex        =   5
      Top             =   600
      Width           =   645
   End
End
Attribute VB_Name = "frmDepartmentMx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  If (Not IsDate(txtStart.Text)) Or (Not IsDate(txtEnd.Text)) Then
    txtStart.SetFocus
    Exit Sub
  End If
  If Check1.Value = Checked Then
    If Check2.Value = Checked Then
        Data1.RecordSource = "zy_ksfymx '" + Left(txtKs, 2) + "','" + txtStart + "','" + txtEnd + "','1','" + Left(Text1, 4) + "'"
        Data1.Refresh
    Else
        Data1.RecordSource = "zy_ksfymx ' ','" + txtStart + "','" + txtEnd + "','2','" + Left(Text1, 4) + "'"
        Data1.Refresh
    End If
  Else
    Data1.RecordSource = "zy_ksfymx '" + Left(txtKs, 2) + "','" + txtStart + "','" + txtEnd + "','3',' '"
    Data1.Refresh
  End If
End Sub

Private Sub Command2_Click()
  If (Not IsDate(txtStart.Text)) Or (Not IsDate(txtEnd.Text)) Then
    txtStart.SetFocus
    Exit Sub
  End If
  If Check1.Value = Checked Then
    If Check2.Value = Checked Then
        Data1.RecordSource = "zy_ksfymx '" + Left(txtKs, 2) + "','" + txtStart + "','" + txtEnd + "','4','" + Left(Text1, 4) + "'"
        Data1.Refresh
    Else
        Data1.RecordSource = "zy_ksfymx ' ','" + txtStart + "','" + txtEnd + "','5','" + Left(Text1, 4) + "'"
        Data1.Refresh
    End If
  Else
    Data1.RecordSource = "zy_ksfymx '" + Left(txtKs, 2) + "','" + txtStart + "','" + txtEnd + "','6',' '"
    Data1.Refresh
  End If
End Sub

Private Sub Command3_Click()
  Unload Me
End Sub

Private Sub Form_Load()
  Me.Height = Screen.Height
  Me.Width = Screen.Width
  Me.Top = 0
  Me.Left = 0

  
  Data1.DatabaseName = MyDatabase
  Data1.Connect = MyConnect
  
End Sub


Private Sub Text1_GotFocus()
  Text1.SelStart = 0
  Text1.SelLength = Len(Text1.Text)
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  Dim rs As Recordset
 If KeyCode = 222 Then
  Text1.Text = ""
  Exit Sub
 End If
 If Len(Text1.Text) > 4 Then
  Text1.Text = ""
 End If
  
  If KeyCode = 13 And Len(Text1.Text) = 4 Then
    Set rs = db.OpenRecordset("SELECT * FROM xmmx_table WHERE xm_ID='" & Trim(Text1.Text) & "'")
    If rs.EOF And rs.BOF Then
        rs.Close
        MsgBox "无此项目代码!请重新输入!"
        Exit Sub
    End If
    Text1.Text = Text1.Text + "-" + rs!xm_name
    rs.Close
  End If

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

End Sub


Private Sub txtEnd_GotFocus()
  txtEnd.SelStart = 0
  txtEnd.SelLength = Len(txtEnd.Text)
End Sub

Private Sub txtKS_KeyDown(KeyCode As Integer, Shift As Integer)
  Dim rs As Recordset
  If KeyCode = 13 And Len(txtKs) = 2 Then
    Set rs = db.OpenRecordset("SELECT * FROM KS_table WHERE KS_ID='" & Trim(txtKs.Text) & "'")
    If rs.EOF And rs.BOF Then
        rs.Close
        MsgBox "无此住院科室代码!请重新输入!"
        Exit Sub
    End If
    txtKs.Text = txtKs.Text & "-" & rs!ks_name
    rs.Close
    txtStart.SetFocus
  End If
End Sub

Private Sub txtKS_KeyUp(KeyCode As Integer, Shift As Integer)
 If KeyCode = 222 Then
  txtKs.Text = ""
  Exit Sub
 End If
 If Len(txtKs.Text) > 3 Then
  txtKs.Text = ""
 End If
End Sub


Private Sub txtStart_GotFocus()
  txtStart.SelStart = 0
  txtStart.SelLength = Len(txtStart.Text)

End Sub

Private Sub txtStart_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = 13 Then
      txtEnd.SetFocus
  End If
End Sub

⌨️ 快捷键说明

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