以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 昨天的查询 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=88357) |
-- 作者:武汉老杨 -- 发布时间:2016/8/1 14:49:00 -- 昨天的查询 查询今天的销售: e.form.Controls("DateTimePicker1").Value =Date.Today() e.form.Controls("combobox1").Value = "有限公司" Dim Filter As String With e.Form.Controls("combobox1") If .Value IsNot Nothing Then Filter = "销售单位 = \'" & .Value & "\'" End If End With With e.Form.Controls("datetimepicker1") If .Value IsNot Nothing Then Filter = "销售日期 = \'" & .Value & "\'" End If End With If Filter > "" Then Tables("销售单").Filter = Filter End If 问一下,如果查询昨天的销售该怎么改代码?
|
-- 作者:大红袍 -- 发布时间:2016/8/1 15:07:00 -- e.form.Controls("DateTimePicker1").Value =Date.Today()
改成
e.form.Controls("DateTimePicker1").Value =Date.Today.AddDays(-1)
http://www.foxtable.com/webhelp/scr/1337.htm
|