各位老师好,用loadfilte 根据用户输入的条件进行加载,有几个条件同时加载,我下面这样写,出错,不知道是什么原因:
Dim Filter As String
With e.Form.Controls("门店编号")
If .Value IsNot Nothing Then
Filter = "归属门店代号 = '" & .Value & "' and "
End If
End With
With e.Form.Controls("回访人")
If .Value IsNot Nothing Then
Filter+ = "回访人 = '" & .Value & "' and "
End If
End With
With e.Form.Controls("销售主管")
If .Value IsNot Nothing Then
Filter+ = "销售主管 = '" & .Value & "' "
End If
End With
If Filter > "" Then
DataTables("rjsytVIP回访记录").LoadFilter = Filter
MessageBox.Show(Filter)
DataTables("rjsytVIP回访记录").Load
End If
调试提示:
---------------------------
---------------------------
归属门店代号 = 'R0039' and
---------------------------
确定
---------------------------