Format(Date, "mm")) > 8 Then
Combo1(2).ListIndex = 2
Else
Combo1(2).ListIndex = 1
End If
txtsql = "select * from kaoshileixing"
Set mrc = ExecuteSQL(txtsql)
Combo1(3).Clear
mrc.MoveFirst
Do While Not mrc.EOF
Combo1(3).AddItem mrc.Fields(0)
mrc.MoveNext
Loop
Combo1(3).ListIndex = 0
Set mrc = Nothing
cjfilldata
End Sub
Public Sub cjfilldata()
Dim mrc1 As ADODB.Recordset
Dim mrc2 As ADODB.Recordset
Dim g As Integer
Dim sum As Single
txtsql = "select distinct from cj where in(select from xj where 班级='" & Trim(Combo1(1).Text) & "') and 学期='" & Trim(Combo1(2).Text) & "' and 类型='" & Trim(Combo1(3).Text) & "'order by cj."
Set mrc1 = ExecuteSQL(txtsql)
If mrc1.EOF = True Then
Exit Sub
Else
'mrc1.MoveLast
'mrc1.MoveFirst
End If
sum = 0
Dim j1 As Long
Dim j2 As Long
j1 = 0
j2 = 0
mrc1.MoveFirst
Do While Not mrc1.EOF
j1 = j1 + 1
mrc1.MoveNext
Loop
mrc1.MoveFirst
For i = 1 To j1
txtsql = "select cj.,xj.,cj.学期,cj.类型,cj.
课程名称,cj.分数 from cj inner join xj on cj.=xj. where cj.学期='" & Trim(Combo1(2).Text) & "' and cj.='" & Trim(mrc1.Fields(0)) & "'and cj.类型='" & Trim(Combo1(3).Text) & "'"