以下是引用Creast在2018/5/10 20:28:00的发言:
我先用显示所有方式确认存在上面的类别为"Boring Bar"的料号, 然后点击 下拉列表点选 "Boring Bar"则什么都不显示了
试试代码改成这样
Dim TCatg2 As WinForm.ComboBox = e.Form.Controls("TCategory2") '类别
Dim yn As WinForm.CheckBox = e.Form.Controls("ExistPurchaseInfor")
If Tcatg2.Text<>"" Then
msgbox(123)
With Tables("PurchasingInfor_ToolingTechList_BK1")
If yn.Checked Then
.Filter="Category='" & TCatg2.Text & "' and ExistInPurchasingFile =true "
Else
.Filter="Category='" & TCatg2.Text & "' and ExistInPurchasingFile =False "
End If
msgbox(.filter)
End With
End If
然后试试把filter改成
.Filter="Category='" & TCatg2.Text & "'"