Dim Filter As
String
With e.Form.Controls("khdm")
If .Value IsNot
Nothing
Then
Filter = "客户代码 = '" & .Value & "'"
End
If
End
With
With e.Form.Controls("khmc")
If .Value IsNot
Nothing
Then
If Filter > "" Then
Filter = Filter & " And "
End
If
Filter = Filter & "客户名称 = '" & .Value & "'"
End
If
End
With
If Filter >""
DataTables("客户信息").LoadFilter = Filter
DataTables("客户信息").Loadtop =""
DataTables("客户信息").Load
Else
DataTables("客户信息").Loadtop ="10" '查询条件为空时默认加载最新修改的10行
DataTables("客户信息").LoadOrder = "维护日期 Desc"
DataTables("客户信息").Load
End If
差不多这样吧