访问对子报表记录进行编号的运行总和问题
我很难弄清楚如何对子报表的记录进行编号。 我有一份主报告,其中提供了一条记录的识别信息。 主报告中有一个子报告,它提供与主报告相关的记录。 我想对这些记录进行编号,从一条到有多少条记录。 我尝试了属性中的运行总和功能(即文本框 = 1,运行总和 = 全部),它在子报表打开时起作用,没有主报表; 但是,当主报表打开时,子报表运行总和不起作用(即它只显示每条记录的数字 1)。
我知道这是主报告/子报告的缺点。 有谁知道如何解决这个问题或我可以在 On Open 事件中添加的 VBA 解决方案?
谢谢你,
东风公司
I am having difficulty figuring out how to number my subreport's records. I have a main report, which provides indentifying information for one record. Within the main report is a subreport, which provides records assoicated with the main report. I wanted to number these records from one to how ever many records there are. I tried the running sum feature in properties (i.e. textbox = 1, running sum = over all) and it works when the subreport is open, without the main report; however, when the main report is open the subreport running sum doesn't function (i.e. it just shows the number 1 for every record).
I understand that this is a main report/subreport drawback. Does anyone know how to get around this or a VBA solution that I can add within an On Open event?
Thank you,
DFM
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用 Access 2003 进行了快速测试,您的方法效果很好。
我在详细信息部分的子报告中创建了一个文本框:
Control Source = "=1"
运行总和=“总体”
肯定还有其他事情发生。
I did a quick test using Access 2003 and your approach works fine.
I created a textbox in the sub-report in the detail section:
Control Source = "=1"
Running Sum = "Over All"
Something else must be going on.