所属期起 所属期止 两列都是日期类型,提取出来的日期都带有00:00:00,所以用了left截取,
Dim rq1 As WinForm.ComboBox = e.Form.Controls("ComboBox3")
rq1.ComboList = DataTables("查询统计表").SQLGetComboListString("left(所属期起,10)","单位 = '" & dw & "'and 征收项目 = '" & xm & "'")
下面的集合就无效了,rq1应该怎么事进去
Dim rq2 As WinForm.ComboBox = e.Form.Controls("ComboBox4")
rq2.ComboList = DataTables("查询统计表").SQLGetComboListString("left(所属期止,10)","单位 = '" & dw & "'and 征收项目 = '" & xm & "' and 所属期起 = '" & format(rq1,"yyyy-MM-dd" &""& "HH:mm:ss") & "'")
但是用find 又能查询到
Dim dr As DataRow
dr = DataTables("查询统计表").Find("单位 = '" & dw & "' and 征收项目 = '" & xm & "' and 所属期起 = '" & rq1 & "'")
e.Form.Controls("ComboBox4").Value = dr("所属期止")
[此贴子已经被作者于2023/9/22 10:10:53编辑过]