以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  生成明细账并打印之  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=154485)

--  作者:lfz123
--  发布时间:2020/9/16 10:02:00
--  生成明细账并打印之
我在表的currentchanged事件中写了如下代码:根据当前行生成该行的明细账并打印之,这样需要我一行一行的点击,我想实现不用我点击,遍历所有行生成明细账并打印之
If e.Table.Current Is Nothing Then \'如果Current为Nothing
    Return \'则返回
Else
    If forms("明细账查询").opened() Then
根据当前行生成该行的明细账代码
Dim btn As WinForm.Button = Forms("明细账查询").Controls("Button2") \'打印按钮
    end if
end if

--  作者:有点蓝
--  发布时间:2020/9/16 10:07:00
--  
那不能放到表事件里,放到窗口按钮

    If forms("明细账查询").opened() Then
for each r as row in tables("表A").rows 根据r生成该行的明细账代码
Dim btn As WinForm.Button = Forms("明细账查询").Controls("Button2") \'打印按钮
next
    end if