以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  混合筛选  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=47234)

--  作者:asionwong
--  发布时间:2014/3/6 16:58:00
--  混合筛选

Dim Filter As String
With
e.Form.Controls("cmbProduct")
   
If .Value IsNot Nothing Then
        Filter =
"产品 = \'" & .Value & "\'"
   
End If
End
With
With
e.Form.Controls("cmbCustomer")
   
If .Value IsNot Nothing Then
       
If Filter > "" Then
            Filter = Filter &
" And "
       
End If
        Filter = Filter &
"客户 = \'" & .Value & "\'"
   
End If
End
With
With
e.Form.Controls("cmbEmployee")
   
If .Value IsNot Nothing Then
       
If Filter >"" Then
            Filter = Filter &
" And "
       
End If
        Filter = Filter &
"雇员 = \'" & .Value & "\'"
   
End If
End
With
With
e.Form.Controls("StartDate")
   
If .Value IsNot Nothing Then
       
If Filter >"" Then
            Filter = Filter &
" And "
       
End If
        Filter = Filter &
"日期 >= #" & .Value & "#"
   
End If
End
With
With
e.Form.Controls("EndDate")
   
If .Value IsNot Nothing Then
       
If Filter >"" Then
            Filter = Filter &
" And "
       
End If
        Filter = Filter &
"日期 <= #" & .Value & "#"
   
End If
End
With
If
e.Form.Controls("rdoYifu").Checked = True \' 如果付款状态选择了"已付"
   
If Filter >"" Then
        Filter = Filter &
" And "
   
End If
    Filter = Filter &
"已付款 = True"
End
If
If
e.Form.Controls("rdoWeifu").Checked = True \' 如果付款状态选择了"未付"
    If
Filter >"" Then
       
Filter = Filter & " And "
   
End If
   
Filter = Filter & "已付款 = False Or 已付款 Is Null"
End If
If
Filter > "" Then
    Tables(
"订单").Filter = Filter
End If

如果希望在满足上面的自选条件下,再加一个条件:Tables("订单")已付款,不付款的不筛选,窗口不增加“已付款”的控件

请问怎么做?谢谢


--  作者:Bin
--  发布时间:2014/3/6 17:08:00
--  
Tables("订单").Filter = Filter & "已付款=True"
--  作者:asionwong
--  发布时间:2014/3/10 23:19:00
--  

Tables("订单").Filter = Filter & "回款方式=\'常规回款\'"

提示语法错误,回款方式后面缺少操作数,请指正,谢谢!

 


--  作者:sloyy
--  发布时间:2014/3/11 0:03:00
--  
回款方式 字段是否是字符?
--  作者:asionwong
--  发布时间:2014/3/11 0:13:00
--  
是的
--  作者:lsy
--  发布时间:2014/3/11 7:38:00
--  
Tables("订单").Filter = Filter & " And 回款方式=\'常规回款\'"
--  作者:asionwong
--  发布时间:2014/3/11 9:03:00
--  
2014-3-8更新的软件,之前做好的button的风格(office风格),项目重新打开了以后,button的风格全部变成custom 风格,每次都这样,20140307版本的倒不会
--  作者:Bin
--  发布时间:2014/3/11 9:03:00
--  
是个小BUG,下个版本会修复.
--  作者:asionwong
--  发布时间:2014/3/11 9:08:00
--  
20140308的版本不知道有什么变化,不像0307版本在更新的时候有提示
--  作者:Bin
--  发布时间:2014/3/11 9:12:00
--  
修复一些BUG,没有更新功能.