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("订单")已付款,不付款的不筛选,窗口不增加“已付款”的控件
请问怎么做?谢谢