If e.Form.Controls("ComboBox1").value Is Nothing
messagebox.show("请选择客户!","信息提示",MessageBoxButtons.ok, MessageBoxIcon.warning)
Return
End If
Dim dt1 As Date=e.Form.Controls("startdate").value
Dim dt2 As Date=e.Form.Controls("enddate").value
Dim kh As String=e.Form.Controls("ComboBox1").value
Dim exp As String = "日期>='" &dt1 & "'" & " And " & "日期<='" &dt2 & "'" & " And " & "客户名称='" &kh & "'"
msgbox(exp)
Tables(e.form.Name & "_Table1").fill("s elect 产品编码,产品名称,sum(数量) as 数量 from {销售单明细} group by 产品编码,产品名称 where " & exp & " ","wjhansdata",True)
上面代码没去掉where 是可以执行的 加上就出错了 ,麻烦帮我看一下