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

📄 yj_ybb.frm

📁 这是一个医院管理系统中的院长查询模块
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Options         =   0
      CursorDriver    =   1
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "biao"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "yj_ybb.frx":0000
      Height          =   5355
      Left            =   75
      OleObjectBlob   =   "yj_ybb.frx":000F
      TabIndex        =   6
      Top             =   1320
      Width           =   9345
   End
End
Attribute VB_Name = "yj_ybb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim m1 As String
Dim M2 As String
Dim mkind_code As String
Dim mname As String


Private Sub drug_kind_Click()
    If drug_kind.Text = "西药" Then mkind_code = "A"
    If drug_kind.Text = "中成药" Then mkind_code = "B"
    If drug_kind.Text = "饮片" Then mkind_code = "C"
    If drug_kind.Text = " " Then mkind_code = "%"
End Sub

Private Sub print_com_Click()
biao.Refresh
If biao.Resultset.EOF And biao.Resultset.BOF Then
   MsgBox "现在库里没有记录,请先输入日期,浏览之后再打印", , "注意"
   print_COM.Enabled = False
   Text1.SetFocus
   Exit Sub
End If
biao.Resultset.MoveFirst
'Printer.PaperSize = 256
Printer.Height = 8000
Printer.Width = 30000
Printer.FontName = "宋体"
Printer.FontSize = 16
Printer.Print "   " + yuanming
Printer.FontSize = 13
If yj_code = 1 Then Printer.Print "    药房药品销售统计(门诊)" + mname
If yj_code = 2 Then Printer.Print "    药房药品销售统计(门诊草)" + mname
If yj_code = 3 Then Printer.Print "    药房药品销售统计(住院)" + mname
Printer.FontSize = 9
Printer.Print " "
Printer.Print "   日期范围:" + CStr(biao.Resultset!xm_date)
biao.Resultset.MoveLast
Printer.Print "       -----" + CStr(biao.Resultset!xm_date)
biao.Resultset.MoveFirst
Printer.FontSize = 13.5
'打印之后将库存药品动态报表清空
Printer.Print "┌──────┬───────┐"
Printer.Print "│ 项      目 │  批  发  额  │"
For i = 0 To 9
If biao.Resultset.EOF Then Exit For
Printer.Print "├──────┼───────┤"
Printer.Print "│" + biao.Resultset!xm_name + "│" + biao.Resultset!price + "│"
biao.Resultset.MoveNext
Next
Printer.Print "└──────┴───────┘"
Printer.FontSize = 12
Printer.Print " 药局负责人:" + Space(10) + "审核:"
Printer.Print " "
Printer.Print " 药品会计:" + Space(8) + "财务科长:"
Printer.Print " "
Printer.Print " 打印日期:" + CStr(Date) + " " + CStr(Time)
Printer.EndDoc

MsgBox "打印结束", , "注意"

End Sub


Private Sub browse_Click()
Dim sss As String
    If Not IsDate(yp_date1.Text) Then
    MsgBox "起始日期错误", , "错误"
        yp_date1.Text = Date
        yp_date1.Text = DateAdd("m", -1, yp_date1.Text)
        yp_date1.Text = DateAdd("d", 1, yp_date1.Text)
        yp_date1.SetFocus
        Exit Sub
    End If
    If Not IsDate(yp_date2.Text) Then
        MsgBox "终止日期错误", , "错误"
        yp_date2.Text = Date
        yp_date2.SetFocus
        Exit Sub
    End If
    If yp_date2 < yp_date1 Then
        MsgBox "结束日期应晚于起始日期,请重输日期!", vbInformation, "提示"
        yp_date1.Text = Date
        yp_date1.Text = DateAdd("m", -1, yp_date1.Text)
        yp_date2.Text = Date
        yp_date1.Text = DateAdd("d", 1, yp_date1.Text)
        yp_date1.SetFocus
        Exit Sub
    End If
    If yp_date1.Text > "2099-12-31" Or yp_date1.Text < "2000-01-01" Then
        MsgBox "输入年限超出范围", , "提示"
        yp_date1.Text = Date
        yp_date1.Text = DateAdd("m", -1, yp_date1.Text)
        yp_date1.Text = DateAdd("d", 1, yp_date1.Text)
        yp_date1.SetFocus
        Exit Sub
    End If
    If yp_date2.Text > "2099-12-31" Or yp_date2.Text < "2000-01-01" Then
        MsgBox "输入年限超出范围", , "提示"
        yp_date2.Text = Date
        yp_date2.SetFocus
        Exit Sub
    End If
mname = drug_kind.Text
If yj_code = 1 Then sss = "yj1_month'" + CStr(yp_date1.Text) + "','" + CStr(yp_date2.Text) + "','" + mkind_code + "'"
If yj_code = 2 Then sss = "yj2_month'" + CStr(yp_date1.Text) + "','" + CStr(yp_date2.Text) + "','" + mkind_code + "'"
If yj_code = 3 Then sss = "yj3_month'" + CStr(yp_date1.Text) + "','" + CStr(yp_date2.Text) + "','" + mkind_code + "'"
biao.SQL = sss
biao.Refresh
print_COM.Enabled = True
End Sub

Private Sub Form_Load()
   Dim dbfstr As String
   Dim dbfname As String
    dbfstr = "ODBC;DATABASE=netba;UID=zc;PWD=1234"
    dbfname = "207his"
    yp_date1.Text = Date
    yp_date1.Text = DateAdd("m", -1, yp_date1.Text)
    yp_date2.Text = Date
    yp_date1.Text = DateAdd("d", 1, yp_date1.Text)
    biao.DataSourceName = "207his"
    biao.Connect = dbfstr
    If yj_code = 1 Then
        Me.Caption = "药房药品销售统计(门诊)"
        drug_kind.AddItem "西药"
        drug_kind.AddItem "中成药"
        drug_kind.AddItem " "
        drug_kind.Text = " "
    End If
    If yj_code = 2 Then
        Me.Caption = "药房药品销售统计(门诊草)"
        drug_kind.AddItem "饮片"
        drug_kind.Text = "饮片"
    End If
    If yj_code = 3 Then
        Me.Caption = "药房药品销售统计(住院)"
        drug_kind.AddItem "西药"
        drug_kind.AddItem "中成药"
        drug_kind.AddItem " "
        drug_kind.Text = " "
    End If

    print_COM.Enabled = False
Screen.MousePointer = vbDefault
End Sub
Private Sub quit_Click()
Unload Me
Form3.Show
End Sub


Private Sub UpDown1_DownClick()
  '日期下调一天
  If IsDate(yp_date1.Text) Then
     yp_date1.Text = CStr(CDate(yp_date1.Text) - 1)
  End If
End Sub
Private Sub UpDown1_UpClick()
  '日期上调一天
  If IsDate(yp_date1.Text) Then
    yp_date1.Text = CStr(CDate(yp_date1.Text) + 1)
  End If
End Sub
Private Sub UpDown2_DownClick()
  '日期下调一天
  If IsDate(yp_date2.Text) Then
     yp_date2.Text = CStr(CDate(yp_date2.Text) - 1)
  End If
End Sub
Private Sub UpDown2_UpClick()
  '日期上调一天
  If IsDate(yp_date2.Text) Then
    yp_date2.Text = CStr(CDate(yp_date2.Text) + 1)
  End If
End Sub




⌨️ 快捷键说明

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