📄 查询课程信息.frm
字号:
VERSION 5.00
Begin VB.Form 查询课程信息
Caption = "Form1"
ClientHeight = 5295
ClientLeft = 60
ClientTop = 345
ClientWidth = 7020
LinkTopic = "Form1"
ScaleHeight = 5295
ScaleWidth = 7020
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "查询"
Height = 495
Left = 240
TabIndex = 18
Top = 3240
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 240
TabIndex = 17
Top = 3840
Width = 1215
End
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 2175
Left = 120
TabIndex = 16
Top = 3000
Width = 3255
Begin VB.CommandButton Command6
Caption = "末记录"
Height = 375
Left = 1440
TabIndex = 22
Top = 1560
Width = 975
End
Begin VB.CommandButton Command5
Caption = "首记录"
Height = 495
Left = 240
TabIndex = 21
Top = 1560
Width = 975
End
Begin VB.CommandButton Command4
Caption = "下一条"
Height = 375
Left = 1440
TabIndex = 20
Top = 960
Width = 975
End
Begin VB.CommandButton Command3
Caption = "上一条"
Height = 375
Left = 1440
TabIndex = 19
Top = 360
Width = 975
End
End
Begin VB.TextBox Text8
Height = 735
Left = 5400
TabIndex = 15
Text = " "
Top = 4200
Width = 1335
End
Begin VB.TextBox Text7
Height = 735
Left = 5400
TabIndex = 14
Text = " "
Top = 3120
Width = 1335
End
Begin VB.TextBox Text6
Height = 735
Left = 5520
TabIndex = 13
Text = " "
Top = 2160
Width = 1335
End
Begin VB.TextBox Text5
Height = 735
Left = 5400
TabIndex = 12
Text = " "
Top = 1080
Width = 1455
End
Begin VB.TextBox Text4
Height = 735
Left = 5280
TabIndex = 11
Text = " "
Top = 120
Width = 1575
End
Begin VB.TextBox Text3
Height = 495
Left = 1920
TabIndex = 5
Text = " "
Top = 2160
Width = 1455
End
Begin VB.TextBox Text2
Height = 615
Left = 2040
TabIndex = 4
Text = " "
Top = 960
Width = 1335
End
Begin VB.TextBox Text1
Height = 615
Left = 2040
TabIndex = 3
Text = " "
Top = 120
Width = 1335
End
Begin VB.Label Label8
Caption = "上课时间"
Height = 615
Left = 3600
TabIndex = 10
Top = 4320
Width = 1575
End
Begin VB.Label Label7
Caption = "任课教师"
Height = 615
Left = 3600
TabIndex = 9
Top = 3120
Width = 1455
End
Begin VB.Label Label6
Caption = "考核类型"
Height = 735
Left = 3600
TabIndex = 8
Top = 2040
Width = 1455
End
Begin VB.Label Label5
Caption = "学时"
Height = 615
Left = 3600
TabIndex = 7
Top = 1080
Width = 1455
End
Begin VB.Label Label4
Caption = "学分"
Height = 615
Left = 3600
TabIndex = 6
Top = 120
Width = 1335
End
Begin VB.Label Label3
Caption = "课程名称"
Height = 735
Left = 120
TabIndex = 2
Top = 2040
Width = 1455
End
Begin VB.Label Label2
Caption = "系部编号"
Height = 735
Left = 120
TabIndex = 1
Top = 960
Width = 1455
End
Begin VB.Label Label1
Caption = "课程编号"
Height = 615
Left = 120
TabIndex = 0
Top = 120
Width = 1455
End
End
Attribute VB_Name = "查询课程信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs4 As New ADODB.Recordset
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Command4_Click()
rs4.MoveNext
If rs4.EOF Then rs4.MoveFirst
Call list
End Sub
Private Sub Command3_Click()
rs4.MovePrevious
If rs4.BOF Then rs4.MoveLast
Call list
End Sub
Private Sub Command5_Click()
If rs4.State <> 0 Then rs4.Close
rs4.Open "select* from 课程信息表", cnn, 3, 1
rs4.MoveFirst
Call list
End Sub
Private Sub Command6_Click()
If rs4.State <> 0 Then rs4.Close
rs4.Open "select* from 课程信息表", cnn, 3, 1
rs4.MoveLast
Call list
End Sub
Private Sub Command1_Click()
If rs4.State <> 0 Then rs4.Close
rs4.Open "select* from 课程信息表", cnn, 3, 1
rs4.Find "课程编号 like '" & Text1 & "'"
If rs4.EOF Then
MsgBox "没有此记录!"
Text1 = ""
Exit Sub
End If
Call list
End Sub
Sub list()
Text1 = rs4("课程编号")
Text2 = rs4("系部编号")
Text3 = rs4("课程名称")
Text4 = rs4("学分")
Text5 = rs4("学时")
Text6 = rs4("考核类型")
Text7 = rs4("任课教师")
Text8 = rs4("上课时间")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -