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


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

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

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


加好友 发短信
等级:六尾狐 帖子:1249 积分:9474 威望:0 精华:0 注册:2013/5/12 9:22:00
  发帖心情 Post By:2017/3/1 10:06: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 + 1
Dim FirstDay As New Date(y, m, 1)
e.Form.Controls("Label6").text = m
Dim LastDay As New Date(y, m, Date.DaysInMonth(y, m))
Filter = "日期 >= #" & FirstDay & "# And 日期 <= #" & LastDay & "#"
msgbox(filter)
ShouRu  = DataTables("收入表").SqlCompute("Sum(收入金额)",Filter)
Zhichu  = DataTables("支出表").SqlCompute("Sum(支出金额)",Filter)
e.Form.Controls("Label7").text = Format(Shouru,"c")
e.Form.Controls("Label8").text = Format(Zhichu,"c")

[此贴子已经被作者于2017/3/1 10:42:25编辑过]

 回到顶部