Dim cb1 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim StartDate As Date = e.Form.Controls("StartDate").value
Dim Enddata As Date = e.Form.Controls("EndDate").value
If (e.Form.Controls("StartDate").text = "") Then
MessageBox.Show("请选择开始时间","提示")
Return
Else If (e.Form.Controls("EndDate").text = "") Then
MessageBox.Show("请选择结束时间","提示")
Return
End If
If cb1.text = "" Then
MessageBox.Show("请选择店铺","提示")
Return
End If
DataTables("SDPHD").LoadFilter = " DM1 = '" & cb1.text & "' And DM2 = 004 AND RQ >= "' & StartDate & "' And RQ <= "' & EndDate & "'"
DataTables("sdphd").load()
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.5.29.8
错误所在事件:加载[SDPHD]失败!
详细错误信息:
')' 附近有语法错误。
测试发现是红色部分报错,但是这句没有错啊,应该是黄色的部分错了
所以我修改了一下
DataTables("SDPHD").LoadFilter = "RQ >= "' & StartDate & "' And RQ <= "' & EndDate & "' DM1 = " & cb1.text & " And DM2 = 004"
但是还是报相同的错误,搞不清楚了
[此贴子已经被作者于2020/7/2 6:12:05编辑过]