老师,我一个红色部分代码点击查询就出现如图1的异常,请帮忙看看,谢谢
此主题相关图片如下:1.jpg
Dim Filter As String
With e.Form.Controls("材料描述1")
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("规格型号1")
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("材料编码3")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "材料编码 = '" & .Value & "'"
End If
End With
If Filter >"" Then
e.Form.controls("待检处理").Table.DataTable.LoadPage = 0
e.Form.controls("待检处理").Table.DataTable.LoadFilter = "([检测状态] = '待审核' or [检测状态] = '驳回' or [检测状态] = '转交') 'and " & iif(filter>"", filter, "1=1")
e.Form.controls("待检处理").Table.DataTable.Load
End If
With Tables("来料检测审核_待检处理")
.Select(.RowSel, .Cols("创建日期").Index)
End With