以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 日期列自动编入日期 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=91209) |
||||
-- 作者:wangj6666 -- 发布时间:2016/10/3 11:59:00 -- 日期列自动编入日期 请问各位大师,如何实现在点击插入行后,日期列新插入行能自动填入下面相邻一行日期增加1天的日期。谢谢! |
||||
-- 作者:狐狸爸爸 -- 发布时间:2016/10/3 19:25:00 -- DataRowAdded事件: Dim idx As Integer = Tables("表A").FindRow(e.DataRow) If idx > 0 AndAlso Idx < Tables("表A").Rows.Count Then If Tables("表A").Rows(idx+1).Isnull("日期") = False Then Tables("表A").Rows(idx)("日期") = Tables("表A").Rows(idx+1)("日期").AddDays(1) End If End If
|
||||
-- 作者:wangj6666 -- 发布时间:2016/10/6 14:56:00 -- 日期列自动编入日期 谢谢回复,可我将以上内容设备到表属性后,还是未能实现自动增加1天的日期后填入。我现在把截图发出来可能更明白一些: 我想实现在2016-10-05上面再点击插入行后,会在新插入的行中的生产日期列中自动填入2016-10-06.我现在插入行后还是未能实现,如附件2 ![]() ![]() 请再帮助解决!谢谢! |
||||
-- 作者:有点蓝 -- 发布时间:2016/10/6 15:18:00 -- Dim idx As Integer = Tables("表A").FindRow(e.DataRow) If idx >= 0 AndAlso Idx < Tables("表A").Rows.Count-1 Then If Tables("表A").Rows(idx+1).Isnull("日期") = False Then Tables("表A").Rows(idx)("日期") = Tables("表A").Rows(idx+1)("日期").AddDays(1) End If End If
|
||||
-- 作者:wangj6666 -- 发布时间:2016/10/7 14:55:00 -- 日期列自动编入日期 这下搞定了。万分感谢您! |