form5.frm
来自「VB+SQL住院管理系统」· FRM 代码 · 共 548 行 · 第 1/2 页
FRM
548 行
Strikethrough = 0 'False
EndProperty
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.Label Label1
Caption = "查询结果"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 3720
TabIndex = 1
Top = 3240
Width = 1335
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 病人 where 住院号= '" & Text1.Text & "' or 姓名='" & Text2.Text & "' "
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Command10_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 病人_手术 where 住院号= '" & Text4.Text & "'"
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
Text4.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 病人 where 出院日期 is not null"
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
End Sub
Private Sub Command4_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 诊断书 where 住院号= '" & Text3.Text & "'"
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
Text3.Text = ""
End Sub
Private Sub Command5_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 诊断书 "
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
End Sub
Private Sub Command6_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 病人 "
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
End Sub
Private Sub Command7_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 病人_手术 "
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
End Sub
Private Sub Command8_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 收据 where 住院号= '" & Text5.Text & "'"
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
Text5.Text = ""
End Sub
Private Sub Command9_Click()
Dim strsql As String
Dim cnn As String
Dim rst As New ADODB.Recordset
cnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;Initial Catalog=住院管理信息系统;Data Source=(local)"
strsql = "select * from 收据 "
Dim Conn As New ADODB.Connection
With Conn
.CursorLocation = adUseClient
.ConnectionString = cnn
.ConnectionTimeout = 10
.Open
End With
rst.Open strsql, Conn, 3, 3
Set DataGrid1.DataSource = rst
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?