Foxtable(狐表)用户栏目专家坐堂 → 关于按钮实现上一月下一个月汇总问题


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

主题:关于按钮实现上一月下一个月汇总问题

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/1 10:45:00 [显示全部帖子]

AfterLoad事件

 

vars("date") = Date.Today

 

本月

 

Dim Filter As String

Dim Zhichu As Double
Dim ShouRu As Double
Dim y As Integer = vars("date").Year
Dim m As Integer = vars("date").Month
Dim FirstDay As New Date(y, m, 1)
vars("date") = FirstDay
 
上月
 

Dim Filter As String

Dim Zhichu As Double
Dim ShouRu As Double
Dim y As Integer = vars("date").Year
Dim m As Integer = vars("date").Month
Dim FirstDay As New Date(y, m, 1)
FirstDay = FirstDay.AddMonths(-1)
vars("date") = FirstDay

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/1 12:30:00 [显示全部帖子]

哦,本月代码改一下

 

Dim Filter As String

Dim Zhichu As Double
Dim ShouRu As Double
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month
Dim FirstDay As New Date(y, m, 1)
vars("date") = FirstDay

 回到顶部