📄 form4.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form 咨询
BackColor = &H00FF8080&
BorderStyle = 3 'Fixed Dialog
Caption = "咨询"
ClientHeight = 5040
ClientLeft = 45
ClientTop = 435
ClientWidth = 9780
Icon = "Form4.frx":0000
LinkTopic = "Form4"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5040
ScaleWidth = 9780
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox Combo1
BackColor = &H00C0FFC0&
Height = 300
Left = 3720
TabIndex = 5
Text = "Combo1"
Top = 480
Width = 2055
End
Begin VB.CommandButton Command3
BackColor = &H00FFC0C0&
Caption = "清除"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
MaskColor = &H00000000&
Style = 1 'Graphical
TabIndex = 4
Top = 4560
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton Command2
BackColor = &H00FFC0C0&
Caption = "返回上一级"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6960
Style = 1 'Graphical
TabIndex = 3
Top = 4560
Width = 1815
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 240
Top = 5040
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_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 = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\study and work\works\duoduo电脑医生\工程\data.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\study and work\works\duoduo电脑医生\工程\data.mdb;Persist Security Info=False"
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 VB.TextBox Text2
BackColor = &H00C0FFC0&
Height = 3255
Left = 240
MultiLine = -1 'True
TabIndex = 2
Text = "Form4.frx":0442
Top = 1080
Width = 8655
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0C0&
Caption = "查询"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7680
MaskColor = &H00FFC0C0&
Style = 1 'Graphical
TabIndex = 1
Top = 480
Width = 1215
End
Begin VB.Label Label2
BackColor = &H00FF8080&
Caption = " 感谢您的使用 祝您身体健康"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 240
TabIndex = 6
Top = 4440
Width = 3255
End
Begin VB.Label Label1
BackColor = &H00FF8080&
Caption = "请输入你所要查询的疾病名称"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 0
Top = 480
Width = 3855
End
End
Attribute VB_Name = "咨询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
If Combo1.Text = "" Then
MsgBox "请输入疾病名称!", vbCritical, "错误提示!"
Exit Sub
Else
Adodc1.RecordSource = "select * from 咨询 where 疾病名称 = " & Combo1.Text
Adodc1.Recordset.MoveFirst
For i = 1 To Adodc1.Recordset.RecordCount
If Adodc1.Recordset.Fields("疾病名称") = Combo1.Text Then
Text2.Text = Adodc1.Recordset.Fields("具体信息")
Else
Adodc1.Recordset.MoveNext
End If
Next i
End If
End Sub
Private Sub Command2_Click()
Unload Me
选择.Show
End Sub
Private Sub Command3_Click()
Combo1 = ""
Text2 = ""
End Sub
Private Sub Form_Load()
Adodc1.RecordSource = "select * from 咨询"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
For i = 1 To Adodc1.Recordset.RecordCount
Combo1.AddItem (Adodc1.Recordset.Fields("疾病名称"))
Adodc1.Recordset.MoveNext
Next i
Combo1 = ""
Text2 = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
选择.Show
End Sub
Private Sub Text2_Change()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -