下面代码只要选了日期,load就出错。弹出窗口正常
.NET Framework 版本:2.0.50727.8762
Foxtable 版本:2018.3.9.1
错误所在事件:加载[灭火器表]失败!
详细错误信息:
第 1 行: '#' 附近有语法错误。
Dim gly As WinForm.ComboBox = e.Form.Controls("管理员")
Dim sd As WinForm.DateTimePicker = e.Form.Controls("开始日期")
Dim ed As WinForm.DateTimePicker = e.Form.Controls("截止日期")
If bm.Value <> "全部" Then
filter = "编码 like '%" & bm.value & "%'"
End If
If xh.Value <> "全部" Then
If filter > "" Then
filter = filter & " and 型号 like '%" & xh.value & "%'"
Else
filter = "型号 like '%" & xh.value & "%'"
End If
End If
If gly.Value <> "全部" Then
If filter > "" Then
filter = filter & " and 管理员 like '%" & gly.value & "%'"
Else
filter = "管理员 like '%" & gly.value & "%'"
End If
End If
If sd.value IsNot Nothing Then
If filter > "" Then
filter = filter & " and 充装预警 >= #" & sd.value & "#"
Else
filter = "充装预警 >= #" & sd.value & "#"
End If
End If
If ed.value IsNot Nothing Then
If filter > "" Then
filter = filter & " and 充装预警 <= #" & ed.value & "#"
Else
filter = "充装预警 <= #" & ed.value & "#"
End If
End If
DataTables("灭火器表").LoadFilter = filter
MessageBox.Show(filter)
DataTables("灭火器表").Load