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("ComboBox3")
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
请问下这个错在哪?前面两个我试了没问题 第三个错在哪?