我有一个窗口中设置按周查询,代码不对,求指点?
'查看量房开始
Dim cbx1 As WinForm.ComboBox = e.Form.Controls("ComboBox5")
Dim cbx2 As WinForm.ComboBox = e.Form.Controls("ComboBox6")
Dim filter As String = "1=1"
If cbx1.text > "" Then
Dim year As String = cbx1.text.SubString(0,2)
Dim week As String = cbx1.text.SubString(3,2)
Dim d As Date = new Date(year+2000, month, 1)
filter &= " and 接单日期 >= #" & d & "# and 接单日期 < #" & d.Addweek(1) & "#"
End If
If cbx2.text > "" Then
filter &= " and 设计师 = '" & cbx2.text & "'"
End If
'msgbox(filter)
e.Form.controls("table1").Table.Filter = filter
'查看量房结束
如图,如案例,
此主题相关图片如下:qq截图20170225113655.jpg