通过产品编号查询 时间(起始和结束),下列代码问题出在哪?还有通过产品编号查询后的产品中的数量合计代码如何写?谢谢!
Dim Filter As String
With e.Form.Controls("产品编号")
If .Value IsNot Nothing Then
Filter = "TextBox1= '" & .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 Filter > "" Then
Tables("销售出库明细").Filter = Filter
End If
此主题相关图片如下:截图00.png
此主题相关图片如下:截图01.png