下拉不支持空格、冒号等,不然就出问题。你要替换成别的字符,如
.AddSelect("垂直分组","垂直分组","产品|[客户]|雇员|2018-01-01 19:33:40|2018-01-01 19:33:45".replace(":", chr(11)))
-----------------
Dim str as String = "|" & DataTables("排班表").sqlGetComboListString("日期","[门店编号] = '" & mdbh & "' and (日期 = '" & Date.Today & "' or 日期 = '" & Date.Today.AddDays(-1) & "') " )
.AddSelect("上班日期","上班日期",str.replace(":", chr(11)))
如果你只需要日期不需要时间,你可以直接写(access数据源),如下
Dim str as String = "|" & DataTables("排班表").sqlGetComboListString("format(日期,'yyyy-MM-dd')","[门店编号] = '" & mdbh & "' and (日期 = '" & Date.Today & "' or 日期 = '" & Date.Today.AddDays(-1) & "') " )
sqlserver数据源,就用convert函数,如
Convert(varchar(10), 日期, 120)
[此贴子已经被作者于2018/1/1 19:38:24编辑过]