以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 按月查询结果求助? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=93091) |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 13:47:00 -- 按月查询结果求助? 如发上来的案例,表中有日期例,我想查出当月某个设计师的量房量,求代码? 此主题相关图片如下:qq截图20161120133747.jpg 此主题相关图片如下:qq截图20161120133759.jpg |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 13:49:00 --
|
||||
-- 作者:zsslly -- 发布时间:2016/11/20 14:32:00 -- 今天周末,老师不在,不知道有没有大侠可以指点? |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 15:21:00 -- 求知识点? |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 16:47:00 --
|
||||
-- 作者:y2287958 -- 发布时间:2016/11/20 16:52:00 -- http://www.foxtable.com/webhelp/scr/2720.htm |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 17:59:00 -- Dim cbcddb As WinForm.ComboBox = e.Form.Controls("combobox1") cbcddb.ComboList=DataTables("表B").Getcomboliststring("量房月份") cbcddb.Text = Format(Date.Today, "yy年mm月") Dim cc As WinForm.comboBox = e.Form.Controls("comboBox2") Dim yy As Integer = Date.Today.Year Dim mm As Integer = Date.Today.Month Dim dt1 As New Date(yy, mm, 1) Dim dt2 As New Date(yy, mm, Date.DaysInMonth(yy, mm)) \'获取本月的最后一天 Dim Filter As String Filter = "量房时间 >= #" & dt1 & "# And 量房时间 <= #" & dt2 & "#" Tables("窗口1_table1").Filter = Filter("设计师 = \'" & cc.text & "\'") 求老师指点代码那里不对?
|
||||
-- 作者:有点青 -- 发布时间:2016/11/20 18:03:00 -- Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1") Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox2") Dim filter As String = "1=1" If cbx1.text > "" Then Dim year As String = cbx1.text.SubString(0,2) Dim month As String = cbx1.text.SubString(3,2) Dim d As Date = new Date(year+2000, month, 1) filter &= " and 量房时间 >= #" & d & "# and 量房时间 < #" & d.AddMonths(1) & "#" End If If cbx2.text > "" Then filter &= " and 设计师 = \'" & cbx2.text & "\'" End If \'msgbox(filter) e.Form.controls("table1").Table.Filter = filter |
||||
-- 作者:zsslly -- 发布时间:2016/11/20 20:42:00 -- 谢谢老师 |