参考:
http://www.foxtable.com/webhelp/topics/1928.htm
Dim Filter As String
With e.Form.Controls("单位")
If .Value IsNot Nothing Then
Filter = "单位 = '" & .Value & "'"
End If
End With
With e.Form.Controls("经济体单元")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "经济体单元 = '" & .Value & "'"
End If
End With
DataTables("订单").LoadFilter = Filter
DataTables("订单").Load