以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 生存查询窗口 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=40465) |
||||
-- 作者:Liangcai -- 发布时间:2013/9/20 22:41:00 -- 生存查询窗口
请指点错在哪?谢谢! |
||||
-- 作者:有点甜 -- 发布时间:2013/9/20 22:56:00 -- 代码 Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1") Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox2") e.Form.Controls("Table1").Table.Fill("Select a.学期 as " & StrToWide(cbx1 .Text) & "没报名,a.班级,a.学生编号,a.学生姓名,a.缴费日期 From {缴学费信息} a INNER JOIN (Select 缴费日期,学生编号 From {缴学费信息} where 学生编号 not In (Select 学生编号 from {缴学费信息} where 学期 = \'" & cbx2.Text & "\') And 学期 = \'" & cbx1.Text & "\') as b on (a.学生编号 = b.学生编号)", "数据库", True) Tables("窗口1_Table1").AutoSizeCols() 或者 Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1") Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox2") e.Form.Controls("Table1").Table.Fill("Select a.学期 as 没报名学期, a.班级,a.学生编号,a.学生姓名,a.缴费日期 From {缴学费信息} a INNER JOIN (Select 缴费日期,学生编号 From {缴学费信息} where 学生编号 not In (Select 学生编号 from {缴学费信息} where 学期 = \'" & cbx2.Text & "\') And 学期 = \'" & cbx1.Text & "\') as b on (a.学生编号 = b.学生编号)", "数据库", True) Tables("窗口1_Table1").AutoSizeCols() |
||||
-- 作者:Liangcai -- 发布时间:2013/9/21 1:26:00 -- 没报名是这样 Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
e.Form.Controls("Table1").Table.Fill("Select a.学期 as 没报名学期, a.班级,a.学生编号,a.学生姓名,a.缴费日期 From {缴学费信息} a INNER JOIN (Select 缴费日期,学生编号 From {缴学费信息} where 学生编号 not In (Select 学生编号 from {缴学费信息} where 学期 = \'" & cbx2.Text & "\') And 学期 = \'" & cbx1.Text & "\') as b on (a.学生编号 = b.学生编号)", "数据库", True)
Tables("窗口1_Table1").AutoSizeCols()
已报名是这样怎么不对呀
Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
e.Form.Controls("Table1").Table.Fill("Select a.学期 as 已报名学期, a.班级,a.学生编号,a.学生姓名,a.缴费日期 From {缴学费信息} a INNER JOIN (Select 缴费日期,学生编号 From {缴学费信息} where 学生编号 In (Select 学生编号 from {缴学费信息} where 学期 = \'" & cbx2.Text & "\') And 学期 = \'" & cbx1.Text & "\') as b on (a.学生编号 = b.学生编号)", "数据库", True)
Tables("窗口1_Table1").AutoSizeCols() |
||||
-- 作者:有点甜 -- 发布时间:2013/9/21 22:45:00 -- 我测试了一下,152行的数据,有144是已经报名的,明细正确吖。 |