问题就出在下面红色标记的语句上:
'1 按RadioButton的要求完成数据加载(这个已经在CheckedChanged中完成刷新
'2 按各选项组合框、文本框对加载后的数据进行筛选
'Dim wo As e.Form.Controls("TBox_WO").Value 'e.Form.Controls("cmbProduct").Value = Nothing
'Dim PN As e.form.controls("TBox_PN").Value
'Dim Res As e.form.controls("TBox_Res").Value
Dim Filter As String
With e.Form.Controls("TBox_WO")
If .Value IsNot Nothing Then
Filter = "[WO] like '%" & .Value.toupper.trim & "%'" '[型号] Like 'A[*]%'
End If
End With
With e.Form.Controls("TBox_PN")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "[PartID] like '%" & .Value.ToUpper.Trim & "%'"
End If
End With
With e.Form.Controls("TBox_Res")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "ResID = '" & .Value.ToUpper.trim & "'"
End If
End With
With e.Form.Controls("ComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "处理班组 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox3")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "责任班组 = '" & .Value & "'"
End If
End With
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "发现时间 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "发现时间 < #" & .Value.adddays(1) & "#"
End If
End With
'If e.Form.Controls("rdoYifu").Checked = True Then' 如果付款状态选择了"已付"
' If Filter > "" Then
' Filter = Filter & " And "
' End If
' Filter = Filter & "已付款 = True"
'End If
'If e.Form.Controls("rdoWeifu").Checked = True Then' 如果付款状态选择了"未付"
' If Filter > "" Then
' Filter = Filter & " And "
' End If
' Filter = Filter & "已付款 = False Or 已付款 Is Null"
'End If
If Filter > "" Then
Tables("AddtionalWOData").Filter = Filter
End If
我知道就是这个问题,如果是Table的显示,我知道如何处理,但这个加载我找了帮助,还是没有解决方案
[此贴子已经被作者于2023/7/15 15:22:22编辑过]