Dim Filter As String
With e.Form.Controls("datetimepicker1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出货日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("datetimepicker2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "出货日期 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("dropbox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "客户编码 = '" & .Value & "'"
End If
End With
If Filter > "" Then
Tables("销出修改_table1").Filter = Filter
Tables("销出修改_table1").Sort = "出货日期"
End If
上面执行正常,但改为
Tables("销出修改_table1").Filter = Filter & "回款金额 = 0 "
直接卡死,请指教,谢谢!