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 = "区域 = '" & .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 & "专合社类别 = '" & .Value & "'"
End If
End With
DataTables("表A").LoadFilter = "第七列 not in (select 第七列 from {表B} where " & filter & ")"
DataTables("表A").Load
甜老师,bin老师,运行出错了。
此主题相关图片如下:qq photo20141128194702.jpg
