LoadFilter中,通配符不是*,是%,所以代码应该是:
Dim Filter As String
With e.Form.Controls("TextBH")
If .Value IsNot Nothing Then
Filter = "版号 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("Textpm")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "品名 like '%" & .Value & "%'"
End If
End With
DataTables("产品信息查询表").LoadFilter = Filter
DataTables("产品信息查询表").Load()
参考:
http://www.foxtable.com/help/topics/0688.htm
http://www.foxtable.com/help/topics/2401.htm
[此贴子已经被作者于2012-10-9 10:58:16编辑过]