www.pudn.com > 西南医院.rar > FrmSelect.frm
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form FrmSelect
Caption = "查询"
ClientHeight = 7095
ClientLeft = 60
ClientTop = 345
ClientWidth = 9375
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 7095
ScaleWidth = 9375
Begin VB.Timer Timer1
Left = 3960
Top = 6360
End
Begin VB.ComboBox Combo3
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 7800
TabIndex = 23
Top = 1200
Width = 1215
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 7800
TabIndex = 22
Top = 120
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 21
Top = 660
Width = 1455
End
Begin VB.TextBox Text7
Height = 195
Left = 3240
TabIndex = 20
Top = 6360
Visible = 0 'False
Width = 150
End
Begin VB.CommandButton Command2
Caption = "查 询"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 555
Left = 4920
TabIndex = 19
Top = 6480
Width = 1515
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 4080
TabIndex = 18
Top = 1200
Width = 1215
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 3360
Options = 0
ReadOnly = 0 'False
RecordsetType = 2 'Snapshot
RecordSource = ""
Top = 4560
Visible = 0 'False
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "关 闭"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 555
Left = 6960
TabIndex = 17
Top = 6480
Width = 1515
End
Begin VB.TextBox Text10
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 960
TabIndex = 16
Top = 6480
Width = 1455
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "FrmSelect.frx":0000
Height = 4575
Left = 0
OleObjectBlob = "FrmSelect.frx":0014
TabIndex = 14
Top = 1680
Width = 9375
End
Begin VB.TextBox Text8
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7800
TabIndex = 13
Top = 630
Width = 1455
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4080
TabIndex = 12
Top = 720
Width = 1455
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4080
TabIndex = 11
Top = 120
Width = 1455
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 10
Top = 1200
Width = 1455
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 9
Top = 120
Width = 1455
End
Begin VB.Label Label10
Caption = "合 计:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 15
Top = 6480
Width = 735
End
Begin VB.Label Label9
Caption = "CCP"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 8
Top = 1200
Width = 615
End
Begin VB.Label Label8
Caption = "病程"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 7
Top = 720
Width = 615
End
Begin VB.Label Label7
Caption = "性别"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 6
Top = 120
Width = 615
End
Begin VB.Label Label6
Caption = "RF"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 5
Top = 1200
Width = 615
End
Begin VB.Label Label5
Caption = "诊 断"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 4
Top = 720
Width = 615
End
Begin VB.Label Label4
Caption = "姓 名"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 3
Top = 120
Width = 615
End
Begin VB.Label Label3
Caption = "用药"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 2
Top = 1200
Width = 615
End
Begin VB.Label Label2
Caption = "年 龄"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 1
Top = 720
Width = 615
End
Begin VB.Label Label1
Caption = "ID 号"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 615
End
End
Attribute VB_Name = "FrmSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public str As String
Private Sub Command1_Click()
Unload Me
FrmMdi.mnuselect1.Checked = False
End Sub
Private Sub Command2_Click()
If Text1.Text <> "" Then
str = str & "and ID号 like '*" & Text1.Text & "*'"
End If
If Text2.Text <> "" Then
str = str & "and 出生日期<#" & CDate(Date - CInt(Text2.Text * 365)) & "#"
End If
If Text3.Text <> "" Then
str = str & "and 用药情况 like'*" & Text3.Text & "*'"
End If
If Text4.Text <> "" Then
str = str & "and 姓名 like '*" & Text4.Text & "*'"
End If
If Text5.Text <> "" Then
str = str & "and 诊断 like'*" & Text5.Text & "*'"
End If
If Combo1.Text <> "" Then
If Combo1.ListIndex = 0 Then
str = str & "and RF < '" & 30 & "'"
Else
str = str & "and RF >= '" & 30 & "'"
End If
End If
If Combo2.Text <> "" Then
str = str & "and 性别 = '" & Combo2.Text & "'"
End If
If Text8.Text <> "" Then
str = str & "and 起病时间<#" & CDate(Date - CInt(Text8.Text * 365)) & "#"
End If
If Combo3.Text <> "" Then
If Combo3.ListIndex = 0 Then
str = str & "and CCP < '" & 5 & "'"
Else
str = str & "and CCP >= '" & 5 & "'"
End If
End If
Data1.RecordSource = str
Data1.Refresh
Text10.Text = Data1.Recordset.RecordCount
str = "select * from select1 where ID号 like '*" & Text7.Text & "*'"
End Sub
Private Sub Command3_Click()
End Sub
Private Sub Form_Load()
Me.Height = 7500
Me.Width = 9495
Combo1.AddItem "阴"
Combo1.AddItem "阳"
Combo2.AddItem "男"
Combo2.AddItem "女"
Combo3.AddItem "阴"
Combo3.AddItem "阳"
Data1.DatabaseName = App.Path & "\message.mdb"
Data1.RecordSource = "select1"
str = "select * from select1 where ID号 like '*" & Text7.Text & "*'"
Data1.Refresh
Timer1.Interval = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
FrmMdi.mnuselect1.Checked = False
End Sub
Private Sub Text6_Change()
End Sub
Private Sub Timer1_Timer()
Data1.RecordSource = "select1"
Text10.Text = Data1.Recordset.RecordCount
Timer1.Interval = 0
End Sub