Dim Filter As String
With e.Form.Controls("店名")
If .Value IsNot Nothing Then
Filter = " '," & .Value & ",' like '%,' +店名汉字+',%'"
End If
End With
With e.Form.Controls("对账品名")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = " '," & .Value & ",' like '%,' +对账品名+',%'"
End If
End With
With e.Form.Controls("对账品类")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = " '," & .Value & ",' like '%,' +对账品类+',%'"
End If
End With
With e.Form.Controls("年")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "年 = '" & .Value & "'"
End If
End With
With e.Form.Controls("月")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "月 = '" & .Value & "'"
End If
End With
If Filter > "" Then
DataTables("盘点明细").LoadFilter = Filter
DataTables("盘点明细").Load()
End If
店名单值,对账品名填入值,查询会查岀全部店名