📄 frmbedwardreport.frm
字号:
BackColor = &H00FFFFFF&
Caption = "Total &In-Patient Report"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 360
Picture = "frmbedwardreport.frx":193A
Style = 1 'Graphical
TabIndex = 2
Top = 1560
Width = 1215
End
Begin VB.CommandButton cmd_bed
BackColor = &H00FFFFFF&
Caption = "Total &Bed Report"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 360
Picture = "frmbedwardreport.frx":1DC3
Style = 1 'Graphical
TabIndex = 1
Top = 360
Width = 1215
End
End
Begin Crystal.CrystalReport Report
Left = 2520
Top = 2520
_ExtentX = 741
_ExtentY = 741
_Version = 348160
PrintFileLinesPerPage= 60
End
Begin ActiveResizeCtl.ActiveResize ActiveResize1
Left = 0
Top = 0
_ExtentX = 847
_ExtentY = 847
Resolution = 4
ScreenHeight = 1024
ScreenWidth = 1280
ScreenHeightDT = 1024
ScreenWidthDT = 1280
FormHeightDT = 4785
FormWidthDT = 11625
FormScaleHeightDT= 4275
FormScaleWidthDT= 11505
ResizeFormBackground= -1 'True
ResizePictureBoxContents= -1 'True
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
Caption = "BED - WARD REPORTS"
BeginProperty Font
Name = "Verdana"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 435
Left = 3600
TabIndex = 13
Top = 240
Width = 4500
End
End
Attribute VB_Name = "frmbedwardreport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private rsWard As New ADODB.Recordset
Private rsRoom As New ADODB.Recordset
Private flag1 As String
Private flag2 As String
Private flag3 As String
Private flag4 As String
Private checkflag As Boolean
Private Sub cmb_bed_room_Click()
cmb_bed_ward.Text = ""
flag4 = cmb_bed_room.Text
checkflag = True
Debug.Print flag4, checkflag
End Sub
Private Sub cmb_bed_ward_Click()
cmb_bed_room.Text = ""
flag4 = cmb_bed_ward.Text
checkflag = False
Debug.Print flag4, checkflag
End Sub
Private Sub cmd_bed_Click()
Report.ReportFileName = App.Path & "\Reports\employee\BedDetail.rpt"
Report.ReplaceSelectionFormula ("")
Report.WindowState = crptMaximized
Report.Action = 1
End Sub
Private Sub cmd_bed_custom_Click()
If flag3 = "" And flag4 = "" Then
MsgBox "Plese Select options"
ElseIf flag3 = "Occu" And flag4 = "" Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetail.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = False")
Report.WindowState = crptMaximized
Report.Action = 1
ElseIf flag3 = "vac" And flag4 = "" Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetail.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = True")
Report.WindowState = crptMaximized
Report.Action = 1
'------------------------------------------------------------------------
ElseIf flag3 = "Occu" And checkflag = True Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetailcustom-1.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = False and {Bed_Details.Room_Ward_ID} = {Room_Details.Room_ID} and {Room_Details.Room_Type} = '" & cmb_bed_room.Text & "'")
Report.WindowState = crptMaximized
Report.Action = 1
ElseIf flag3 = "Occu" And checkflag = False Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetailcustom-1.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = False and {Bed_Details.Room_Ward_ID} = {Ward_Details.Ward_ID} and {Ward_Details.Ward_Name} = '" & cmb_bed_ward.Text & "'")
Report.WindowState = crptMaximized
Report.Action = 1
'-----------------------------------------------------------------------
ElseIf flag3 = "vac" And checkflag = True Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetailcustom-1.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = True and {Bed_Details.Room_Ward_ID} = {Room_Details.Room_ID} and {Room_Details.Room_Type} = '" & cmb_bed_room.Text & "'")
Report.WindowState = crptMaximized
Report.Action = 1
ElseIf flag3 = "vac" And checkflag = False Then
Report.ReportFileName = App.Path & "\Reports\employee\BedDetailcustom-1.rpt"
Report.ReplaceSelectionFormula ("{Bed_Details.Available} = True and {Bed_Details.Room_Ward_ID} = {Ward_Details.Ward_ID} and {Ward_Details.Ward_Name} = '" & cmb_bed_ward.Text & "'")
Report.WindowState = crptMaximized
Report.Action = 1
'{Bed_Details.Available} = False and{Bed_Details.Room_Ward_ID} = {Ward_Details.Ward_ID} and {Ward_Details.Ward_Name} = "Aids Ward"
End If
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Option3_Click(Index As Integer)
If Option3(0).Value = True Then
flag3 = "Occu"
ElseIf Option3(1).Value = True Then
flag3 = "vac"
End If
End Sub
Private Sub cmd_gardian_report_Click()
Report.ReportFileName = App.Path & "\Reports\employee\Gardian.rpt"
Report.DiscardSavedData = True
Report.WindowState = crptMaximized
Report.Action = 1
End Sub
Private Sub cmd_inpa_report_Click()
Report.ReportFileName = App.Path & "\Reports\employee\inpatient.rpt"
Report.DiscardSavedData = True
Report.WindowState = crptMaximized
Report.Action = 1
End Sub
Private Sub cmd_ward_Click()
Report.ReportFileName = App.Path & "\Reports\employee\WardDetails.rpt"
Report.DiscardSavedData = True
Report.ReplaceSelectionFormula ("")
Report.WindowState = crptMaximized
Report.Action = 1
End Sub
Private Sub Form_Load()
rsWard.Open "select Ward_Name from Ward_Details ", cnPatients, adOpenDynamic, adLockOptimistic
rsWard.MoveFirst
While rsWard.EOF = False
cmb_bed_ward.AddItem rsWard!Ward_Name
rsWard.MoveNext
Wend
'Ward_ID Ward_Name Ward_Rate Ward_Desc
rsWard.Close
rsRoom.Open "select * from Room_Types ", cnPatients, adOpenDynamic, adLockOptimistic
rsRoom.MoveFirst
While rsRoom.EOF = False
cmb_bed_room.AddItem rsRoom!Room_Type
rsRoom.MoveNext
Wend
rsRoom.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -