以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] 两个条件,但一个表里面没有,要怎么改? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=91162) |
-- 作者:77611471 -- 发布时间:2016/9/30 17:14:00 -- [求助] 两个条件,但一个表里面没有,要怎么改? 做了一个查找按钮,返回两个表,但是“BOM表”里面没有“订单编号”,这段代码要怎么改? Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then Filter ="产品编号 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "订单编号 Like \'%" & .Value & "%\'" End If End With If Filter > "" Then Tables("工时成本表").Filter = Filter Tables("BOM表").Filter = Filter End If
|
-- 作者:有点蓝 -- 发布时间:2016/9/30 17:27:00 -- Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then Filter ="产品编号 Like \'%" & .Value & "%\'" End If End With If Filter > "" Then Tables("BOM表").Filter = Filter End If With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "订单编号 Like \'%" & .Value & "%\'" End If End With If Filter > "" Then Tables("工时成本表").Filter = Filter End If
|
-- 作者:77611471 -- 发布时间:2016/10/5 15:14:00 -- 谢谢! |