筛选结果如何显示在窗口表,试了多次一直没显示,老师帮忙看看最后面红色代码那里不对.谢谢Dim Filter As String
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
Tables("主页窗_Table1").DataSource = Tables '将统计结果绑定到Table