SQL 数据库课程设计学生成绩系统
Adodc2.Recordset.MoveNext Loop End Sub
窗体装载处理程序(Load)
Private Sub Form_Load()
DataGrid1.AllowDelete = True DataGrid1.AllowAddNew = False DataGrid1.AllowUpdate = False End Sub
列表框(List1)处理(Click)
Private Sub List1_Click()
Dim s1 As String, s2 As String, s3 As String
s1 = "select 学号,成绩 from 学生成绩表 where 课程名称='" & List1.Text & "'" s2 = " and 学号 in (select 学号 from 学生基本信息表 " s3 = "where 班级名称 ='" & DataList1.Text & "')" Adodc3.RecordSource = s1 & s2 & s3 Adodc3.Refresh
Set DataGrid1.DataSource = Adodc3 End Sub
列表框(List2)处理(Click)
Private Sub List2_Click() Text1.Text = "" End Sub
4.7.3 成绩查询窗体
进行学生成绩的查询