While (Not rs.EOF) And (Not rs.BOF)理解分析
Private Sub Form_Load()Dim strItem As String
'得到班号
strClassNo = B学生查询.strQuery
'初始化学生下拉框
SQL = " select 学号,姓名 from 学生基本信息表"
SQL = SQL & " where 班号='" & strClassNo & "' order by 学号"
Set rs = Nothing
Set rs = SelectSQL(SQL, msg)
CboStu.Clear
If rs.RecordCount > 0 Then
Do While (Not rs.EOF) And (Not rs.BOF)
strItem = rs.Fields(0) & " " & rs.Fields(1)
CboStu.AddItem (strItem)
rs.MoveNext
Loop
rs.MoveFirst
CboStu.ListIndex = 0
Else
MsgBox ("目前没有学生信息!")
'控件可用性
CmdReport.Enabled = False
Exit Sub
End If
Call ShowData '显示学生学籍报表
End Sub
这个怎么能解呀!
请教