-- 条件加载数据
Dim filter As String
Dim sts() As String = {"客户简称","客户名称","地址","邮编","代码","业务员"}
For Each st As String In sts
Dim val As String = e.Form.Controls(st).value
If val > "" Then
val = val.Replace("*","[*]")
If filter = "" Then
filter = st & " like \'%" & val & "%\'"
Else
filter = filter & " and " & st & " like \'%" & val & "%\'"
End If
End If
Next
filter = filter & " And 业务员 = \'users\'"
DataTables("客户JK").LoadFilter = filter
DataTables("客户JK").Load()
想达到目的:不同的用户加载业务员等于登录用户的数据。
请老师修改代码
[此贴子已经被作者于2017/3/28 13:26:38编辑过]