题目内容
数据库的“职工基本情况表”有“姓名”和“职称”等字段,要分别统计教授、副教授和其他人员的数量。请在空白处填入适当语句,使程序可以完成指定的功能。
Private Sub command5_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim zc As DAO.Field
Dim Count 1 As Integer,Count2 As Integer,Count3 As Integer
Sett db=CurrentDb()
Set rs=db.OpenRecordset(“职工基本情况表”)
Set zc=rs.Fields(“职称”)
Count1=0:Count2=0:Count3=0
Do While Not______
Select Case zc
Case Is=“教授”
Count1=Count1+1
Case Is=“副教授”
Count2=Count2+1
Case Else
Count3=Count3+1
End Select
______
Loop
rs.Close
se rs=Nothing
Set db=Nothing
MsgBox“教授:”&Count 1&“,副教授:”&Count2&“,其他:”&Count 3
End Sub
查看答案
搜索结果不匹配?点我反馈