Foxtable(狐表)用户栏目专家坐堂 → [求助]筛选的问题,求助。


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

主题:[求助]筛选的问题,求助。

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/11/10 16:27:00 [显示全部帖子]

 Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt1 As Date = Date.Today.AddDays(-w+1) '获取本周的第一天
Dim dt2 As Date = dt1.AddDays(7)
Dim Filter As String
Filter = "日期 >= #" & dt1 & "# And 日期 < #" & dt2 & "#"
msgbox(filter)
Tables("订单").Filter = Filter

 

---------------

 

Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt1 As Date = Date.Today.AddDays(-w+1).addDays(7) '获取本周的第一天
Dim dt2 As Date = dt1.AddDays(7)
Dim Filter As String
Filter = "日期 >= #" & dt1 & "# And 日期 < #" & dt2 & "#"
msgbox(filter)
Tables("订单").Filter = Filter


 回到顶部