以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 窗口不知道什么原因报错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=60730) |
||||||||
-- 作者:xjc620 -- 发布时间:2014/11/30 11:05:00 -- 窗口不知道什么原因报错 .NET Framework 版本:2.0.50727.6421 Foxtable 版本:2014.11.11.1 错误所在事件:窗口,月度查询,AfterLoad 详细错误信息: 添加或减去的值产生无法表示的 DateTime。 参数名: months 代码 Dim str As String = "" Dim maxd As Date = DataTables("月度查询").Compute("max(应维护日期)") Dim mind As Date = DataTables("月度查询").Compute("min(应维护日期)") Do While mind <= maxd str &= Format(maxd, "yyyy年MM月|") maxd = maxd.AddMonths(-1) Loop Dim cbx As WinForm.ComboBox = e.Form.Controls("ComboBox1") cbx.ComboList = str.Trim("|") 代码应该没错上例子老师帮我查看下吧,,密码158998
|
||||||||
-- 作者:有点甜 -- 发布时间:2014/11/30 11:09:00 -- Dim str As String = "" Dim maxd As Date = DataTables("月度查询").Compute("max(应维护日期)") Dim mind As Date = DataTables("月度查询").Compute("min(应维护日期)") If maxd <> Nothing AndAlso mind <> Nothing Then Do While mind <= maxd str &= Format(maxd, "yyyy年MM月|") maxd = maxd.AddMonths(-1) Loop Dim cbx As WinForm.ComboBox = e.Form.Controls("ComboBox1") cbx.ComboList = str.Trim("|") End If |