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("combobox1")
If .Value IsNot Nothing Then
Filter = "第1列 = '" & .Value & "'"
End If
End With
With e.Form.Controls("combobox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "第2列 = '" & .Value & "'"
End If
End With
If Filter <> "" Then
DataTables("表A").LoadFilter = "第4列 not in (select 第七列 from {表B} where " & filter & ")"
End If
DataTables("表A").Load
例如万福蛋鸡专合社,筛选之后仍然在表A里存在啊。。。跪求大神指点。
此主题相关图片如下:1.jpg
此主题相关图片如下:2.jpg