一个筛选查询问题?代码如下:
Dim Filter
As
String
With
e.Form.Controls("cmbProduct")
If .Value IsNot
Nothing
Then
Filter =
"产品 =
'" &
.Value & "'"
End
If
End
With
With
e.Form.Controls("text1")
If .Value IsNot
Nothing
Then
If Filter >""
Then
Filter =
Filter & " And "
End
If
Filter = Filter
& "纱支 >= #" & .Value
& "#"
End
If
End
With
With
e.Form.Controls("tex2")
If .Value IsNot
Nothing
Then
If Filter >""
Then
Filter =
Filter & " And "
End
If
Filter = Filter
& "纱支 <= #" & .Value
& "#"
End
If
End
With
If
Filter > ""
Then
Tables("产品").Filter = Filter
End If
为何出现“日期”不对,纱支为数值型,如何查找数值范围内的数据(如查找某个产品,12<纱支<20内的数据)