我设置了一个选择加载数据的窗口,一般数据加载都正常,但是日期加载报错,请大神帮忙看看我的这段代码错在哪?以下是加载按钮的代码:
With e.Form.Controls("cmbEmployee")
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 & "#"
End If
End With
'If Filter > "" Then
' Tables("故障台账").Filter = Filter
'End If
If Filter > "" Then
DataTables("故障台账").LoadFilter = Filter '设置加载条件
DataTables("故障台账").Load() '加载数据
End If
报错显示“#”附近语句错误
[此贴子已经被作者于2021/12/24 8:16:01编辑过]