以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] DateTimePicker控件日期筛选 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173242) |
-- 作者:王小风 -- 发布时间:2021/11/20 16:32:00 -- [求助] DateTimePicker控件日期筛选 下边代码提示: like 后缺少操作位数 Dim txt As String = e.Form.Controls("TextBox1").Text Dim rkrq As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1") Dim tbl As Table=Tables("原材进检_Table1") If txt IsNot Nothing And rkrq IsNot Nothing Then txt="\'%" & txt & "%\'" tbl.Filter="单据编号 like" & txt & "And 入库日期 like" & rkrq.Value End If |
-- 作者:有点蓝 -- 发布时间:2021/11/20 16:46:00 -- If txt > "" And rkrq <> Nothing Then txt="\'%" & txt & "%\'" |
-- 作者:王小风 -- 发布时间:2021/11/20 16:51:00 -- 代码提示: |
-- 作者:王小风 -- 发布时间:2021/11/20 16:59:00 -- 代码改为这个的话 只能先选择输入日期框 如果先输入单据编号的话 会提示: Dim txt As String = e.Form.Controls("TextBox1").Text Dim rkrq As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1") Dim tbl As Table=Tables("原材进检_Table1") If txt IsNot Nothing And rkrq IsNot Nothing Then txt="\'%" & txt & "%\'" tbl.Filter="单据编号 like" & txt & " And 入库日期 =#" & rkrq.Value & "#" End If
|
-- 作者:有点蓝 -- 发布时间:2021/11/20 17:05:00 -- If txt > "" And rkrq.value <> Nothing Then |