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

📄 住院收入查询.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 frmHospitalCharge 
   Caption         =   "住院收入查询"
   ClientHeight    =   5745
   ClientLeft      =   2325
   ClientTop       =   1545
   ClientWidth     =   6420
   LinkTopic       =   "Form1"
   ScaleHeight     =   5745
   ScaleWidth      =   6420
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Command1 
      Caption         =   "浏  览 &L"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   5085
      TabIndex        =   1
      Top             =   390
      Width           =   2025
   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          =   525
      Left            =   7695
      TabIndex        =   0
      Top             =   390
      Width           =   2025
   End
   Begin MSMask.MaskEdBox txtDate 
      Height          =   405
      Left            =   2130
      TabIndex        =   2
      Top             =   495
      Width           =   1965
      _ExtentX        =   3466
      _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 MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "住院收入查询.frx":0000
      Height          =   7305
      Left            =   270
      OleObjectBlob   =   "住院收入查询.frx":0010
      TabIndex        =   4
      Top             =   1125
      Width           =   11490
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   1  'ODBCCursor
      DefaultType     =   1  'UseODBC
      Exclusive       =   0   'False
      Height          =   480
      Left            =   2670
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   1230
      Width           =   2610
   End
   Begin VB.Label Label1 
      Caption         =   "报表时间"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   465
      Left            =   645
      TabIndex        =   3
      Top             =   525
      Width           =   1500
   End
End
Attribute VB_Name = "frmHospitalCharge"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Dim s_date As String
  Dim e_date As String
  If Me.Tag = "1" Then
    If Not IsDate(txtDate.Text) Then
        txtDate.Text = "    -  -  "
        txtDate.SetFocus
        Exit Sub
    End If
    s_date = txtDate.Text
    e_date = txtDate.Text
  End If
  
  If Me.Tag = "2" Then
     e_date = txtDate.Text + "-25"
     If Not IsDate(e_date) Then
        txtDate.Text = "    -  "
        txtDate.SetFocus
        Exit Sub
     End If
     s_date = DateAdd("m", -1, e_date)
  End If
  
  If Me.Tag = "3" Then
     If Val(txtDate) > 2050 Or Val(txtDate.Text) < 1999 Then
        txtDate.Text = "    "
        txtDate.SetFocus
        Exit Sub
     End If
     e_date = txtDate + "-12-25"
     s_date = DateAdd("yyyy", -1, e_date)
  End If
  
  Data1.RecordSource = "ZY_MZ_SR '" + s_date + "','" + e_date + "','1'"
  Data1.Refresh

End Sub





Private Sub Command3_Click()
   Unload Me
End Sub

Private Sub Form_Activate()

  Data1.DatabaseName = MyDatabase
  Data1.Connect = MyConnect
  If Me.Tag = "1" Then
     txtDate.Mask = "####-##-##"
     txtDate.Text = Date
  End If
  If Me.Tag = "2" Then
     txtDate.Mask = "####-##"
  End If
  If Me.Tag = "3" Then
     txtDate.Mask = "####"
  End If
  
End Sub

Private Sub Form_Load()
  Me.Top = 0
  Me.Left = 0
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Form3.Enabled = True
   Form3.Show
End Sub

Private Sub txtDate_GotFocus()
  txtDate.BackColor = vbWhite
  txtDate.SelStart = 0
  txtDate.SelLength = Len(txtDate.Text)
End Sub

Private Sub txtDate_LostFocus()
  txtDate.BackColor = &H80000000
End Sub

⌨️ 快捷键说明

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