📄 frmclasscourse.frm
字号:
VERSION 5.00
Begin VB.Form frmClassCourse
BorderStyle = 1 'Fixed Single
Caption = "班级课程设置"
ClientHeight = 5055
ClientLeft = 3345
ClientTop = 1020
ClientWidth = 5430
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5055
ScaleWidth = 5430
Begin VB.ListBox lstChosenCourse
BackColor = &H80000018&
Height = 2790
Left = 3120
Style = 1 'Checkbox
TabIndex = 14
Top = 1440
Width = 2055
End
Begin VB.ListBox lstAllCourse
BackColor = &H80000018&
Height = 2790
Left = 240
Style = 1 'Checkbox
TabIndex = 12
Top = 1440
Width = 2055
End
Begin VB.ComboBox comClassCourse
BackColor = &H80000018&
Height = 300
Index = 3
Left = 2880
TabIndex = 10
Top = 720
Width = 2415
End
Begin VB.ComboBox comClassCourse
BackColor = &H80000018&
Height = 300
Index = 2
Left = 720
TabIndex = 8
Top = 720
Width = 1455
End
Begin VB.ComboBox comClassCourse
BackColor = &H80000018&
Height = 300
Index = 1
Left = 2880
TabIndex = 6
Top = 240
Width = 2415
End
Begin VB.ComboBox comClassCourse
BackColor = &H80000018&
Height = 300
Index = 0
Left = 720
TabIndex = 4
Top = 240
Width = 1455
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 375
Left = 1440
TabIndex = 3
Top = 4440
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 375
Left = 2760
TabIndex = 2
Top = 4440
Width = 1095
End
Begin VB.CommandButton cmdChoose
Caption = "=>"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2460
Style = 1 'Graphical
TabIndex = 1
Top = 2280
Width = 495
End
Begin VB.CommandButton cmdRemove
Caption = "<="
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2460
Style = 1 'Graphical
TabIndex = 0
Top = 2760
Width = 495
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "所选科目"
Height = 180
Index = 5
Left = 3120
TabIndex = 15
Top = 1200
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "可选科目"
Height = 180
Index = 4
Left = 240
TabIndex = 13
Top = 1200
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "学期"
Height = 180
Index = 3
Left = 2400
TabIndex = 11
Top = 780
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "学制"
Height = 180
Index = 2
Left = 240
TabIndex = 9
Top = 780
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "专业"
Height = 180
Index = 1
Left = 2400
TabIndex = 7
Top = 300
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "年级"
Height = 180
Index = 0
Left = 240
TabIndex = 5
Top = 300
Width = 360
End
End
Attribute VB_Name = "frmClassCourse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'----------------------------------frmClassCourse.frm----------------------------------
Option Explicit
Private Sub comClassCourse_Click(Index As Integer)
Dim objRecordset As ADODB.Recordset
'选择年级
If Index = 0 Then
'查询专业
strSQL = "select DISTINCT 专业 from Classes where 年级='" & Trim(comClassCourse(0).Text) & "'"
Set objRecordset = ExecuteSQL(strSQL)
If objRecordset.EOF = True Then
comClassCourse(1).Text = ""
comClassCourse(2).Text = ""
Exit Sub
End If
'显示专业
comClassCourse(1).Clear
objRecordset.MoveFirst
Do Until objRecordset.EOF
comClassCourse(1).AddItem objRecordset.Fields(0)
objRecordset.MoveNext
Loop
'查询学制
comClassCourse(1).ListIndex = 0
strSQL = "select DISTINCT 年制 from Classes where 年级='" & Trim(comClassCourse(0).Text) & "' and 专业='" & Trim(comClassCourse(1).Text) & "'"
Set objRecordset = ExecuteSQL(strSQL)
If objRecordset.EOF = True Then
comClassCourse(2).Text = ""
Exit Sub
End If
'显示学制
comClassCourse(2).Clear
objRecordset.MoveFirst
Do Until objRecordset.EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -