请大神们指教!
代码如下:
If e.Form.Controls("出库").Checked = True ' 如果付款状态选择了"出库"
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出库状态 = True"
End If
If e.Form.Controls("在库").Checked = True ' 如果付款状态选择了"在库"
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出库状态 = False Or 出库状态 Is Null"
End If
If e.Form.Controls("销售").Checked = True ' 如果付款状态选择了"销售"
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出库类型 = '销售'"
End If
If e.Form.Controls("领料").Checked = True ' 如果付款状态选择了"领料"
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出库类型 = '领料'"
End If
If e.Form.Controls("调拔").Checked = True ' 如果付款状态选择了"调拔"
If Filter >"" Then

此主题相关图片如下:qq浏览器截屏未命名.jpg

Filter = Filter & " And "
End If
Filter = Filter & "出库类型 = '调拔'"
End If
前两个IF循环可以实现筛选查询,但后三个却不行,请大神们看看!
[此贴子已经被作者于2014-11-4 14:14:17编辑过]