以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 填充序列号问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=148106) |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/3/31 11:29:00 -- 填充序列号问题 老师们帮帮忙 需求目的:如果逻辑列“有无底片”勾选后,底片张号能够按照“有无底片”的勾选情况序列填充,没有勾选的不填充序列号 效果如图 下面的表事件KeyDown如何改写 If e.keycode = keys.z AndAlso e.control = True Then Dim t As Table = e.Table For i As Integer = t.LeftCol To t.RightCol For j As Integer = t.TopRow+1 To t.BottomRow t(j, i) = t(j-1, i)+1 Next Next End If
|
||||
-- 作者:有点蓝 -- 发布时间:2020/3/31 11:57:00 -- If e.keycode = keys.z AndAlso e.control = True Then Dim t As Table = e.Table dim i as intger = 1 For i As Integer = 0 To t.rows.count - 1 if t.rows(i)("有无底片") t.rows(i)("底片张号") = format(i,"0000") i=i+1 end if Next End If
|
||||
-- 作者:yfy13338431925 -- 发布时间:2020/3/31 14:51:00 -- 兰老师,运行不了啊,编译通过不了 [此贴子已经被作者于2020/3/31 14:52:12编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2020/3/31 15:32:00 -- 一点点的笔误都没有能力判断么 If e.keycode = keys.z AndAlso e.control = True Then Dim t As Table = e.Table Dim i As Integer = 1 For i As Integer = 0 To t.rows.count - 1 If t.rows(i)("有无底片") t.rows(i)("底片张号") = format(i,"0000") i=i+1 End If Next End If |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/3/31 16:04:00 -- 老师,您说的笔误我改了,还是不可以 |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/3/31 16:33:00 -- 兰老师,把实例传给您看看
|
||||
-- 作者:有点蓝 -- 发布时间:2020/3/31 16:48:00 -- If e.keycode = keys.z AndAlso e.control = True Then Dim t As Table = e.Table Dim k As Integer = 1 For i As Integer = 0 To t.rows.Count - 1 If t.rows(i)("有无底片") t.rows(i)("底片张号") = k k=k+1 End If Next End If
|
||||
-- 作者:yfy13338431925 -- 发布时间:2020/3/31 17:00:00 -- 三克油老师 |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/4/1 14:57:00 -- 继续问蓝老师一个问题,快捷键序列填充“页号”怎么才能按三行序列填充 |
||||
-- 作者:有点蓝 -- 发布时间:2020/4/1 15:38:00 -- dim idx as integer = 1 for i as integer = 0 to tables("A").rows.count -1 step 3tables("A").rows(i) = idx if i+1 < tables("A").rows.count then tables("A").rows(i+1) = idx if i+2 < tables("A").rows.count then tables("A").rows(i+2) = idx idx+= 1 next
|