如何打印记录集中的所有记录 [英] How to print all records in recordset
本文介绍了如何打印记录集中的所有记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个子窗体,显示所选日期的所有发票。有一个全部打印应该打印记录集中所有记录的按钮(下面的代码)。我无法弄清楚为什么它不起作用,但似乎只打印一条记录。
有没有人有任何想法?
I have a subform that displays all of the invoices for the day selected. There is a "Print all" button (code below) that should print all the records in the recordset. I cant figure out why it does not work, but it appears to be only printing one record.
Does anyone have any ideas?
展开 | 选择 | Wrap | 行号
推荐答案
我只想说rs应该声明为DAO.Recordset,否则它是不明确的。另外,rs(6)& rs(7)在你的未注释代码中完全没有意义。
对我有限的理解似乎唯一可疑的是你设置rs(6),但检查rs(7)。你也设置为-1但检查> 0。
I would say only that rs should be declared as DAO.Recordset, as otherwise it is ambiguous. Also, rs(6) & rs(7) are entirely meaningless in your uncommented code.
The only things that appear questionable to my limited understanding is that you set rs(6), but check rs(7). Also you set to -1 but check for > 0.
谢谢
这是更新后的代码:
Thanks
Here is the updated code:
展开 | 选择 | Wrap | 行号
@ matt753
你在哪里关门报告是为了让它再次重新打开以捕获循环中的下一个值?您打开报告以显示单个记录或通过标准,它肯定会显示一系列记录。你不应该打开一次报告吗?
@matt753
Hi,
Where are you closing the report in order for it to re-open again to catch the next value in the loop? You open a report to show either a single record or pass criteria to it show a sequence of records surely. Should you not be opening a report once?
这篇关于如何打印记录集中的所有记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文