以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  查询  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=170180)

--  作者:admin22327
--  发布时间:2021/7/15 8:20:00
--  查询

Dim Filter As String
With e.Form.Controls("cmbProduct")
    If .Value IsNot Nothing Then
        Filter = "客户名称 = \'" & .Value & "\'"
    End If
End With

With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 >= \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("EndDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 <= \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
    DataTables("客户明细账_Table1").LoadFilter = Filter \'And dr \'设置加载条件
    DataTables("客户明细账_Table1").Load()
End If

 

这段代码如何把这个条件加进去  "经办人 = \'" & User.Name & "\'"


--  作者:有点蓝
--  发布时间:2021/7/15 9:04:00
--  
Dim Filter As String = "经办人 = \'" & User.Name & "\'"
With e.Form.Controls("cmbProduct")
    If .Value IsNot Nothing Then
        Filter = " and 客户名称 = \'" & .Value & "\'"
    End If
End With