想增加一个条件,同时筛选“登记时间”列中值为空的数据,同时也需要以下的条件,需要加什么语名句
Tables("进出单表").Filter =“登记时间” IsNull
加了上面这句筛不出来。
Dim sd As WinForm.DateTimePicker = e.Form.Controls("开始时间")
Dim ed As WinForm.DateTimePicker = e.Form.Controls("结束时间")
Dim Filter As String
With e.Form.Controls("开始时间")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "要求出单时间 >= #" & sd .Value & "#"
End If
End With
With e.Form.Controls("结束时间")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "要求出单时间 <= #" & ed .Value & "#"
End If
End With
If Filter > "" Then
Tables("进出单表").Filter = Filter
End If
Tables("进出单表").Sort = "要求出单时间"