?? frmmzcx.frm
字號(hào):
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 = "醫(yī)院門(mén)診情況查詢"
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 = "關(guān)閉&(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 = "所有數(shù)據(jù)庫(kù)記錄列表"
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 " 你可能執(zhí)行了非法操作! "
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 "門(mén)診藥房"
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 "門(mén)診收費(fèi)"
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 "住院部收費(fèi)"
Adodc1.RecordSource = "select * from zyf order by ID"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Visible = False
Case "醫(yī)生處方"
Adodc1.RecordSource = "select * from chufang order by ID"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Visible = False
Case "醫(yī)院藥品庫(kù)"
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 "中草藥庫(kù)"
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 "醫(yī)療器材庫(kù)"
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 "藥品調(diào)撥"
Adodc1.RecordSource = "select * from ypdb order by ID"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Visible = False
Case "住院病人"
Adodc1.RecordSource = "select 住院證號(hào),患者姓名,性別,年齡,地址,病種,科室類別,病房號(hào),床位號(hào),主治大夫,住院日期,出院日期,預(yù)交費(fèi),費(fèi)用合計(jì),操作員 from zyf order by 住院證號(hào)"
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 = "請(qǐng)選擇查詢部門(mén)"
Exit Sub
errp:
MsgBox "數(shù)據(jù)庫(kù)連接失敗!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前沒(méi)有窗口被激活"
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活動(dòng)窗口:" & 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 "門(mén)診藥房"
.RecordSource = "select * from yaofang where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "門(mén)診收費(fèi)"
.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 "住院部收費(fèi)"
.RecordSource = "select * from zyf where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "醫(yī)生處方"
.RecordSource = "select * from chufang where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "醫(yī)院藥品庫(kù)"
.RecordSource = "select * from kcyp where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "中草藥庫(kù)"
.RecordSource = "select * from caoyao where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "醫(yī)療器材庫(kù)"
.RecordSource = "select * from qixie where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "藥品調(diào)撥"
.RecordSource = "select * from ypdb where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
Case "住院病人"
.RecordSource = "select 住院證號(hào),患者姓名,性別,年齡,地址,病種,科室類別,病房號(hào),床位號(hào),主治大夫,住院日期,出院日期,預(yù)交費(fèi),費(fèi)用合計(jì),操作員 from zyf where " & Text1.Text & " like'" & Text2.Text & "%'"
.Refresh
DataGrid1.Columns(0).Visible = False
End Select
End With
Exit Sub
err2:
MsgBox "輸入條件錯(cuò)誤或輸入值類型不匹配!"
End Sub
Private Sub Text2_GotFocus()
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -