📄 frmcjkccx.frm
字号:
VERSION 5.00
Object = "{DD44C0E7-B2CF-11D1-8DD3-444553540000}#1.0#0"; "CELL32.OCX"
Begin VB.Form FrmCjkccx
Caption = "按课程查询成绩"
ClientHeight = 6495
ClientLeft = 135
ClientTop = 1545
ClientWidth = 8580
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6495
ScaleWidth = 8580
WhatsThisButton = -1 'True
WhatsThisHelp = -1 'True
Begin VB.CommandButton Command1
Caption = "查询(&Q)"
Height = 375
Left = 7320
TabIndex = 16
Top = 600
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "打印(&P)"
Height = 375
Left = 7320
TabIndex = 15
Top = 1200
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "返回(&X)"
Height = 375
Left = 7320
TabIndex = 14
Top = 1800
Width = 1095
End
Begin CELLLib.Cell Cell1
Height = 4935
Left = 120
TabIndex = 13
Top = 1440
Width = 6855
_Version = 65536
_ExtentX = 12091
_ExtentY = 8705
_StockProps = 0
End
Begin VB.Frame Frame1
Caption = "成绩查询对象"
Height = 1215
Left = 120
TabIndex = 0
Top = 120
Width = 6855
Begin VB.ComboBox Combo3
Height = 300
Left = 4920
Style = 2 'Dropdown List
TabIndex = 12
Top = 675
Width = 1695
End
Begin VB.TextBox Text2
Height = 270
Left = 3480
TabIndex = 5
Top = 675
Width = 615
End
Begin VB.TextBox Text1
Height = 270
Left = 3480
TabIndex = 4
Text = "2000"
Top = 315
Width = 615
End
Begin VB.ComboBox Combo1
Height = 300
Left = 720
Style = 2 'Dropdown List
TabIndex = 3
Top = 320
Width = 2055
End
Begin VB.ComboBox Combo2
Height = 300
Left = 720
Style = 2 'Dropdown List
TabIndex = 2
Top = 675
Width = 2055
End
Begin VB.ComboBox Combo5
Height = 300
ItemData = "FrmCjkccx.frx":0000
Left = 4920
List = "FrmCjkccx.frx":001C
Style = 2 'Dropdown List
TabIndex = 1
Top = 315
Width = 1695
End
Begin VB.Label Label6
Caption = "课程:"
Height = 255
Left = 4320
TabIndex = 11
Top = 720
Width = 1095
End
Begin VB.Label Label5
Caption = "班级:"
Height = 255
Left = 2880
TabIndex = 10
Top = 720
Width = 615
End
Begin VB.Label Label1
Caption = "年级:"
Height = 255
Left = 2880
TabIndex = 9
Top = 360
Width = 615
End
Begin VB.Label Label2
Caption = "系别:"
Height = 255
Left = 120
TabIndex = 8
Top = 360
Width = 735
End
Begin VB.Label Label3
Caption = "专业:"
Height = 255
Left = 120
TabIndex = 7
Top = 720
Width = 615
End
Begin VB.Label Label4
Caption = "学期:"
Height = 255
Left = 4320
TabIndex = 6
Top = 360
Width = 615
End
End
End
Attribute VB_Name = "FrmCjkccx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'***************************************************************************************
' 过程:fGetAllKcmc
' 功能:根据系别和专业,形成该系别和专业应开设的所有课程名称列表
' 参数:
' objXbCombo:系别名称
' objZyCombo:专业名称
' objTargetCombo:课程名称
'***************************************************************************************
Private Sub fGetAllKcmc(ByRef objXbCombo As Object, ByRef objZyCombo As Object, ByRef objTargetCombo As Object)
Dim objRs As New ADODB.Recordset
If objXbCombo.Text <> "" And objZyCombo.Text <> "" Then
Set objRs = objCon.Execute("Select kcmc From KCMCB Where zybh='" & fGetZybh(objZyCombo.Text) & _
"' And xbbh='" & fGetXbbh(objXbCombo.Text) & "'")
If Not objRs.EOF Then
objTargetCombo.Clear
Do While Not objRs.EOF
objTargetCombo.AddItem objRs("kcmc")
objRs.MoveNext
Loop
objTargetCombo.ListIndex = 0
End If
objRs.Close
End If
End Sub
'***************************************************************************************
' 过程:Combo1_Click
' 功能:系别调整后更新课程名称列表
'***************************************************************************************
Private Sub Combo1_Click()
fGetAllKcmc Combo1, Combo2, Combo3
End Sub
'***************************************************************************************
' 过程:Combo2_Click
' 功能:专业调整后更新课程名称列表
'***************************************************************************************
Private Sub Combo2_Click()
fGetAllKcmc Combo1, Combo2, Combo3
End Sub
'***************************************************************************************
' 过程:Command1_Click
' 功能:根据系别(Combo1)、专业(Combo2)、年级(Text1)、学期(Combo5)和课程(Combo3)查询成绩
'***************************************************************************************
Private Sub Command1_Click()
Dim objRs1 As ADODB.Recordset
Dim numI As Integer, numcol As Integer, numRow As Integer
Dim strExec As String, strTemp As String
If Combo1.Text = "" Or Combo2.Text = "" Or Combo5.Text = "" Or Text1.Text = "" Or Combo3.Text = "" Then
MsgBox "您所指定的对象信息不全,无法查询成绩!", vbCritical, "错误信息"
Else
'设置成绩查询表的表头
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -