'设置加载条件
Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value IsNot Nothing Then
Filter = "客户名称 Like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("riqi1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "签单日期 >= '" & .Value &
"'"
End If
End With
With e.Form.Controls("riqi2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "签单日期 <= '" & .Value &
"'"
End If
End With
If user.IsRole("数据全享小组") Then
ElseIf
user.name = "员工A" Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "分支机构 = 'A分公司'"
老师您好,如果员工A同时负责两个分公司:A分公司、B分公司,这个地方代码我改怎么调整?
Else
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "签约人 = '" & user.name &
"'"
End If
If Filter > "" Then
With DataTables("销售报表")
.LoadFilter = Filter
.Load()
End With
End If