
此主题相关图片如下:无标题.jpg

我筛选控件的代码如下: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("TextBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " and "
End If
Filter = Filter & "[款号] LIKE '*" & .Value & "*'"
End If
End With
With e.Form.Controls("TextBox3")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "[缸号] LIKE '*" & .Value & "*'"
End If
End With
If Filter > "" Then
Tables("生产管理").Filter = Filter
End If
为什么代码没有起作用,说明一下。谢谢!
Tables("生产管理").Filter = Filter
应该用
Tables("父表名.子表名").Filter = Filter