📄 searchind1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form SearchInformation
BackColor = &H8000000A&
Caption = "查找学生信息 "
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2400
Top = 1560
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
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=studentInformation.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=studentInformation.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.CommandButton Command4
Caption = "返回"
Height = 495
Left = 840
TabIndex = 4
Top = 2640
Width = 975
End
Begin VB.CommandButton Command3
Caption = "取消"
Height = 495
Left = 3480
TabIndex = 5
Top = 2640
Width = 975
End
Begin VB.CommandButton Command1
Caption = "开始查找"
Default = -1 'True
Height = 495
Left = 2160
TabIndex = 3
Top = 2640
Width = 975
End
Begin VB.TextBox Text1
Height = 495
Left = 2760
TabIndex = 1
Top = 120
Width = 1815
End
Begin VB.ListBox List1
Height = 1320
ItemData = "SearchInd1.frx":0000
Left = 120
List = "SearchInd1.frx":0013
TabIndex = 2
Top = 1080
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "SearchInd1.frx":0028
Left = 120
List = "SearchInd1.frx":003B
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "值:"
Height = 180
Left = 2160
TabIndex = 8
Top = 240
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "运算符"
Height = 180
Left = 120
TabIndex = 7
Top = 840
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "查找关键字"
Height = 180
Left = 240
TabIndex = 6
Top = 120
Width = 900
End
End
Attribute VB_Name = "SearchInformation"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Me.Combo1.Text <> "" And Me.List1.Text <> "" Then
Finkind = Me.Combo1.Text
Singkin = Me.List1.Text
Me.Adodc1.RecordSource = "Select * from 学生信息 where " & Finkind & Singkin & " '" & Me.Text1.Text & "'"
Me.Adodc1.Refresh
If Me.Adodc1.Recordset.EOF Then
MsgBox "没找到你要的信息"
Me.Text1.SelStart = 0
Me.Text1.SelLength = Len(Text1.Text)
Me.Text1.SetFocus
Me.Adodc1.RecordSource = "学生信息"
Me.Adodc1.Refresh
Else
InformationSearchResult.Adodc1.RecordSource = " Select * from 学生信息 where " & Finkind & Singkin & "'" & Me.Text1.Text & "'"
InformationSearchResult.Adodc1.Refresh
InformationSearchResult.Show
End If
Me.Adodc1.RecordSource = "学生信息"
Me.Adodc1.Refresh
Else
MsgBox "请你选择查找类型和条件", , "提示"
End If
End Sub
Private Sub Command3_Click()
Combo1.Text = ""
Text1.Text = ""
Unload Me
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -