📄 查询学生成绩信息.frm
字号:
VERSION 5.00
Begin VB.Form 查询学生成绩信息
Caption = "Form1"
ClientHeight = 5040
ClientLeft = 60
ClientTop = 345
ClientWidth = 4875
LinkTopic = "Form1"
ScaleHeight = 5040
ScaleWidth = 4875
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
Height = 615
Left = 1440
TabIndex = 6
Text = " "
Top = 1920
Width = 1335
End
Begin VB.TextBox Text2
Height = 615
Left = 1320
TabIndex = 4
Text = " "
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 1320
TabIndex = 1
Text = " "
Top = 120
Width = 1095
End
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 1695
Left = 240
TabIndex = 0
Top = 3120
Width = 3735
Begin VB.CommandButton Command3
Caption = " 清除"
Height = 495
Left = 720
TabIndex = 9
Top = 960
Width = 1695
End
Begin VB.CommandButton Command1
Caption = " 查询"
Height = 495
Left = 240
TabIndex = 8
Top = 240
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出查询"
Height = 495
Left = 1800
TabIndex = 7
Top = 240
Width = 1215
End
End
Begin VB.Label Label3
Caption = "成绩 "
Height = 735
Left = 120
TabIndex = 5
Top = 1920
Width = 1215
End
Begin VB.Label Label2
Caption = "课程编号"
Height = 615
Left = 120
TabIndex = 3
Top = 840
Width = 1095
End
Begin VB.Label Label1
Caption = "学号"
Height = 495
Left = 120
TabIndex = 2
Top = 120
Width = 855
End
End
Attribute VB_Name = "查询学生成绩信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs8 As New ADODB.Recordset
Private Sub Command1_Click()
If rs8.State <> 0 Then rs8.Close
rs8.Open "select* from 成绩表", cnn, 3, 1
rs8.Find "学号 like '" & Text1 & "'"
If rs8.EOF Then
MsgBox "没有此记录!"
Text1 = ""
Exit Sub
Else
Text3 = rs8("成绩")
Text2 = rs8("课程编号")
End If
End Sub
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Command3_Click()
Text1 = ""
Text3 = ""
Text2 = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -