Foxtable(狐表)用户栏目专家坐堂 → 按月查询结果求助?


  共有2016人关注过本帖树形打印复制链接

主题:按月查询结果求助?

帅哥哟,离线,有人找我吗?
有点青
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:二尾狐 帖子:573 积分:2961 威望:0 精华:0 注册:2016/10/27 14:33:00
  发帖心情 Post By: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

 回到顶部