以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 筛选日期前 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=147177) |
-- 作者:yangwenghd -- 发布时间:2020/3/11 15:04:00 -- 筛选日期前 老师,这个是那里的格式错了呀,筛选出日期控件以前切处理状态不为已处理的行,感谢 感谢 Tables("事件编辑窗口_Table1").filter = "事件日期 >Forms("事件编辑窗口"). Controls("DateTimePicker1") And 处理状态 <> \'已处理\'"
|
-- 作者:有点蓝 -- 发布时间:2020/3/11 15:11:00 -- 参考:http://www.foxtable.com/webhelp/topics/1284.htm |
-- 作者:yangwenghd -- 发布时间:2020/3/11 16:34:00 -- 老师,最后那一段应该怎么写呀,能帮忙看看吗?感谢 感谢 Dim Filter As String
With e.Form.Controls("DateTimePicker1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "事件日期 = \'" & .Value & "\'" \'此处内容自行修改 End If End With If Filter > "" Then \'Tables("事件编辑窗口_Table1").Filter <= Filter And 处理状态 <>\'已处理\'" End If |
-- 作者:有点蓝 -- 发布时间:2020/3/11 16:40:00 -- Dim Filter As String = "处理状态 <>\'已处理\'" With e.Form.Controls("DateTimePicker1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "事件日期 = \'" & .Value & "\'" \'此处内容自行修改 End If End With Tables("事件编辑窗口_Table1").Filter = Filter |
-- 作者:yangwenghd -- 发布时间:2020/3/11 17:09:00 -- 感谢 老师,如果是Label12绑定的日期可以在那里改呀。 Dim Filter As String = "处理状态 <>\'已处理\'"
\'With e.Form.Controls("DateTimePicker4") With e.Form.Controls("Label12").Text If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "事件日期 <= \'" & .Value & "\'" \'此处内容自行修改 End If End With Tables("事件编辑窗口_Table1").Filter = Filter |
-- 作者:有点蓝 -- 发布时间:2020/3/11 17:33:00 -- With e.Form.Controls("Label12").Text If .text > "" Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "事件日期 <= \'" & .text & "\'" \'此处内容自行修改 End If End With |