改一下
Dim Filter As String = "1=1"
With e.Form.Controls("门店编号")
If .Value IsNot Nothing Then
Filter = " and 归属门店代号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("回访人")
If .Value IsNot Nothing Then
Filter+ = " and 回访人 = '" & .Value & "'"
End If
End With
With e.Form.Controls("销售主管")
If .Value IsNot Nothing Then
Filter+ = " and 销售主管 = '" & .Value & "' "
End If
End With
If Filter > "" Then
DataTables("rjsytVIP回访记录").LoadFilter = Filter
MessageBox.Show(Filter)
DataTables("rjsytVIP回访记录").Load
End If