有个“筛选”按钮,有如下代码:
Dim FilterPH As String
With e.Form.Controls("checkedComboBox_牌号")
If .Value IsNot Nothing Then
FilterPH = "牌号 In ('" & .Value.Replace(",", "','") & "')"
End If
End With
Dim FilterHD As String
With e.Form.Controls("checkedComboBox_厚度")
If .Value IsNot Nothing Then
FilterHD = "厚度 In ('" & .Value.Replace(",", "','") & "')"
End If
End With
If FilterPH > "" OrElse FilterHD > "" Then
Tables("销售出库明细主窗口_Table_工序合并表_副本").Filter = FilterPH And FilterHD & "and [工序] ='成品入库' and [库存标记]=true "
End If
执行后,返回:从字符串“牌号 In ('316L','4J29','4J36')”到类型“Long”的转换无效。
说明:'316L','4J29','4J36'是我任意选择的牌号
谢谢老师