Dim c2 As String =e.sender.text
If c2>""
Dim dt As DataTable = DataTables("成绩")
Dim cmd As New SQLCommand
cmd.connectionname =
cmd.CommandText = "SE LE CT DISTINCT 考试名称,单位名称,学段 From {成绩} where 学段 = '小学' and 考试名称 in (Se lect 考试名称 From {小学考试名称} where 上分锁定 = 0 and 是否统一上分 = 1) And 单位名称 In (Sel ect 单位全称,所属片区 from {学校信息} where 所属片区 = '" & lffp & "'"
dt = cmd.ExecuteReader()
Dim cmb3 As WinForm.ComboBox = e.form.Controls("ComboBox3")
cmb3.ComboList = dt.GetComboListString("单位名称")
End If
lffp="白合片区"
提示“白合片区“附近有错误 逻辑是:cmb3的下拉显示的单位只能是 成绩表中符合条件 学段=小学,考试名称符合小学考试名称.上分锁定=0 和是否统一上分=1 并且单位名称 =学校信息.单位全称且 学校信息.所属片区= lffp,请老师指教,谢谢