📄 学生基本状况管理界面.frm
字号:
VERSION 5.00
Begin VB.Form 学生基本状况管理界面
BorderStyle = 1 'Fixed Single
Caption = "学生状况管理"
ClientHeight = 5190
ClientLeft = 45
ClientTop = 330
ClientWidth = 6585
Icon = "Form3.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5190
ScaleWidth = 6585
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
Caption = "查询条件:"
Height = 1215
Left = 2160
TabIndex = 5
Top = 240
Width = 4095
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 3000
TabIndex = 8
Top = 480
Width = 855
End
Begin VB.CommandButton Command1
Caption = "查询"
Enabled = 0 'False
Height = 375
Left = 2040
TabIndex = 7
Top = 480
Width = 855
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 6
Top = 480
Width = 1575
End
End
Begin VB.PictureBox Adodc1
BackColor = &H80000005&
Enabled = 0 'False
ForeColor = &H80000008&
Height = 375
Left = 2640
ScaleHeight = 315
ScaleWidth = 2715
TabIndex = 9
Top = 600
Width = 2775
End
Begin VB.Frame Frame1
Caption = "查询类型:"
Height = 1215
Left = 240
TabIndex = 2
Top = 240
Width = 1815
Begin VB.OptionButton Option1
Caption = " 学号"
Height = 255
Index = 0
Left = 360
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.OptionButton Option1
Caption = " 姓名"
Height = 255
Index = 1
Left = 360
TabIndex = 3
Top = 720
Width = 1215
End
End
Begin VB.Frame Frame3
Caption = "查询结果:"
Height = 3375
Left = 240
TabIndex = 0
Top = 1560
Width = 6015
Begin VB.PictureBox DataGrid1
Height = 2775
Left = 240
ScaleHeight = 2715
ScaleWidth = 5475
TabIndex = 1
Top = 360
Width = 5535
End
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
Dim str As String
If Option1(0).Value = True Then
str = "select * from data where 学号 = " & Val(Text1.Text)
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
'recnum = rs.RecordCount
' If recnum = 0 Then
' MsgBox "数据库无此记录", , "系统提示"
' Exit Sub
'End If
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Else
' If Adodc1.Recordset.RecordCount = 0 Then
' MsgBox "数据库无此记录", , "系统提示"
' Exit Sub
'End If
str = "select * from data where 姓名 LIKE '" & Text1.Text & "%'"
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False"
Adodc1.CommandType = adCmdText
End Sub
Private Sub Option1_Click(Index As Integer)
Command1.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -