📄 frmscoi.frm
字号:
Top = 240
Width = 1455
End
Begin VB.ComboBox Combo2
Height = 300
Index = 0
Left = 1560
Style = 2 'Dropdown List
TabIndex = 37
Top = 240
Width = 1455
End
Begin VB.TextBox Text2
BackColor = &H8000000E&
Enabled = 0 'False
Height = 300
Index = 2
Left = 6600
MaxLength = 10
TabIndex = 34
Top = 240
Width = 1380
End
Begin VB.TextBox Text2
BackColor = &H8000000E&
Height = 300
Index = 1
Left = 0
MaxLength = 10
TabIndex = 30
Top = 240
Width = 1380
End
Begin VB.TextBox Text2
BackColor = &H8000000E&
Height = 300
Index = 0
Left = 0
MaxLength = 14
TabIndex = 29
Top = 600
Visible = 0 'False
Width = 1380
End
Begin CSCommand.Command Command3
Height = 375
Left = 5280
TabIndex = 15
Top = 720
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "frmscoi.frx":093A
Caption = "查 询"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command Command4
Height = 375
Left = 6840
TabIndex = 16
Top = 720
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "frmscoi.frx":0956
Caption = "取 消"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试分数"
Height = 255
Index = 9
Left = 6600
TabIndex = 36
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试课程"
Height = 255
Index = 8
Left = 4920
TabIndex = 35
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学生编号"
Height = 255
Index = 7
Left = 3240
TabIndex = 33
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学生班号"
Height = 255
Index = 6
Left = 1560
TabIndex = 32
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试期号"
Height = 255
Index = 1
Left = 0
TabIndex = 31
Top = 0
Width = 1335
End
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
ForeColor = &H80000008&
Height = 1215
Index = 0
Left = 240
ScaleHeight = 1185
ScaleWidth = 8145
TabIndex = 2
Top = 5880
Width = 8175
Begin VB.TextBox Text1
BackColor = &H8000000E&
Height = 300
Index = 0
Left = 0
MaxLength = 14
TabIndex = 18
Top = 600
Visible = 0 'False
Width = 1380
End
Begin VB.TextBox Text1
BackColor = &H8000000E&
Height = 300
Index = 1
Left = 0
MaxLength = 10
TabIndex = 17
Top = 240
Width = 1380
End
Begin VB.TextBox Text1
BackColor = &H8000000E&
Height = 300
Index = 2
Left = 6600
MaxLength = 10
TabIndex = 11
Top = 240
Width = 1380
End
Begin VB.ComboBox Combo1
Height = 300
Index = 2
Left = 4920
Style = 2 'Dropdown List
TabIndex = 9
Top = 240
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
Index = 1
Left = 3240
Style = 2 'Dropdown List
TabIndex = 7
Top = 240
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
Index = 0
Left = 1560
Style = 2 'Dropdown List
TabIndex = 5
Top = 240
Width = 1455
End
Begin CSCommand.Command Command1
Height = 375
Left = 5280
TabIndex = 12
Top = 720
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "frmscoi.frx":0972
Caption = "添 加"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command Command2
Height = 375
Left = 6840
TabIndex = 13
Top = 720
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "frmscoi.frx":098E
Caption = "取 消"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试分数"
Height = 255
Index = 5
Left = 6600
TabIndex = 10
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学生编号"
Height = 255
Index = 4
Left = 3240
TabIndex = 8
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试课程"
Height = 255
Index = 3
Left = 4920
TabIndex = 6
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学生班号"
Height = 255
Index = 2
Left = 1560
TabIndex = 4
Top = 0
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "考试期号"
Height = 255
Index = 0
Left = 0
TabIndex = 3
Top = 0
Width = 1335
End
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 4770
Left = 240
TabIndex = 0
Top = 960
Width = 8175
_ExtentX = 14420
_ExtentY = 8414
_Version = 393216
Cols = 4
FixedCols = 0
BackColorFixed = 14737632
BackColorBkg = -2147483643
Appearance = 0
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " 成 绩 信 息 列 表"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 240
TabIndex = 1
Top = 600
Width = 8175
End
End
Attribute VB_Name = "frmscoi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim MsgText As String
Private Sub Combo1_Click(Index As Integer)
Dim txSQL As String
If Index = 0 Then
txSQL = "select * from student_Form where student_Cla='" & Trim(Combo1(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = True Then
MsgBox "请先进行班级设置!", vbOKOnly, "提示"
Else
With Combo1(1)
.Clear
Do While Not mrc.EOF
.AddItem Trim(mrc!student_NO)
mrc.MoveNext
Loop
End With
End If
txSQL = "select * from class_Cour where class_NO='" & Trim(Combo1(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = True Then
MsgBox "请先进行班级设置!", vbOKOnly, "提示"
Else
With Combo1(2)
.Clear
Do While Not mrc.EOF
.AddItem Trim(mrc!course_Name)
mrc.MoveNext
Loop
End With
End If
End If
End Sub
Private Sub Combo2_Click(Index As Integer)
Dim txSQL As String
If Index = 0 Then
txSQL = "select DISTINCT score_Stu from score_Form where score_Cla='" & Trim(Combo2(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = False Then
With Combo2(1)
.Clear
Do While Not mrc.EOF
.AddItem Trim(mrc!score_Stu)
mrc.MoveNext
Loop
End With
End If
txSQL = "select DISTINCT score_Cou from score_Form where score_Cla='" & Trim(Combo2(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = False Then
With Combo2(2)
.Clear
Do While Not mrc.EOF
.AddItem Trim(mrc!score_Cou)
mrc.MoveNext
Loop
End With
End If
End If
End Sub
Private Sub Combo3_Click(Index As Integer)
Dim txSQL As String
If Index = 0 Then
txSQL = "select * from student_Form where student_Cla='" & Trim(Combo3(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = False Then
With Combo3(1)
.Clear
Do While Not mrc.EOF
If mrc!student_NO <> .Text Then
.AddItem Trim(mrc!student_NO)
End If
mrc.MoveNext
Loop
End With
End If
txSQL = "select * from class_Cour where class_NO='" & Trim(Combo3(0).Text) & "'"
Set mrc = ExecuteSQL(txSQL, MsgText)
If mrc.EOF = False Then
With Combo3(2)
.Clear
Do While Not mrc.EOF
If mrc!course_Name <> .Text Then
.AddItem Trim(mrc!course_Name)
End If
mrc.MoveNext
Loop
End With
End If
End If
End Sub
Private Sub Command1_Click()
Dim txtSQL As String
If Text1(1) = "" Then
MsgBox "考试期号不能为空!", vbOKOnly, "提示"
Text1(1).SetFocus
Exit Sub
End If
If Combo1(0).Text = "" Then
MsgBox "学生班号不能为空!", vbOKOnly, "提示"
Combo1(0).SetFocus
Exit Sub
End If
If Combo1(1).Text = "" Then
MsgBox "学生编号不能为空!", vbOKOnly, "提示"
Combo1(1).SetFocus
Exit Sub
End If
If Combo1(2).Text = "" Then
MsgBox "考试课程不能为空!", vbOKOnly, "提示"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -