📄 frmfirst.frm
字号:
VERSION 5.00
Begin VB.Form frmFirst
Caption = "Form1"
ClientHeight = 3750
ClientLeft = 60
ClientTop = 345
ClientWidth = 9180
LinkTopic = "Form1"
ScaleHeight = 3750
ScaleWidth = 9180
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "获取患者ID列表"
Height = 465
Left = 2100
TabIndex = 3
Top = 45
Width = 1770
End
Begin VB.ListBox lstPatientID
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3420
Left = 60
TabIndex = 2
Top = 45
Width = 1875
End
Begin VB.TextBox Text1
Height = 405
Left = 2130
TabIndex = 1
Text = "Text1"
Top = 1080
Width = 1470
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 2055
TabIndex = 0
Top = 1680
Width = 1650
End
End
Attribute VB_Name = "frmFirst"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Load frmMain
Call frmMain.I_Init(Text1.Text)
frmMain.Show
End Sub
Private Sub Command2_Click()
Dim rsPatient As New ADODB.Recordset, myConn As New ADODB.Connection, strSql As String, i As Long
If rsPatient.STATE <> adStateClosed Then
rsPatient.Close
End If
myConn.CursorLocation = adUseClient
If myConn.STATE <> adStateOpen Then
myConn.Open modGlobalDbConnect.GetConnectionString
End If
strSql = "SELECT PATIENT_ID FROM CHECK_LIST"
rsPatient.Open strSql, myConn
If rsPatient.RecordCount >= 1 Then
For i = 0 To rsPatient.RecordCount - 1
If Not IsNull(rsPatient.Fields("PATIENT_ID")) Then
lstPatientID.AddItem rsPatient.Fields("PATIENT_ID")
End If
rsPatient.MoveNext
Next
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub lstPatientID_Click()
Text1.Text = lstPatientID.Text
End Sub
Private Sub lstPatientID_DblClick()
Load frmMain
Call frmMain.I_Init(lstPatientID.Text)
frmMain.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -