如何在报告中显示副本号 [英] How to Display the Copy Number in a report

查看:65
本文介绍了如何在报告中显示副本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Access 2007,但任何VBA代码都可能正常工作。


我需要显示我打印的副本号。


例如,如果用户打印4份,我需要分别在每份副本的页脚中显示以下内容:

复制1

复制2

复制3

复制4


任何想法都会受到赞赏。


如果你能得到它显示复制1的4,复制2的4,等等会更好。

I am using Access 2007 but any VBA code will probably work.

I need to display which copy number I have printed.

For example if the user prints 4 copies I need to display the following in the page footer of each copy respectively:
Copy 1
Copy 2
Copy 3
Copy 4

Any ideas would be appreciated.

If you can get it to show Copy 1 of 4, Copy 2 of 4, etc that would be even better.

推荐答案

我没有想过这个,但有两件事立刻流行到心神。


首先,您需要创建一个公共变量来保存要打印的总份数。用户在发送打印时必须输入的值。


其次,您需要查看在报告的打印过程中创建某种循环。然后以某种方式从一个增加到存储在公共变量中的值。
I haven''t really thought about this but two things immediately pop to mind.

First one is that you will have to create a public variable to hold the total number of copies to be printed. A value which will have to be entered by the user when sending to print.

Secondly, you will need to look at creating some kind of loop in the on Print procedure of the report. Then somehow increment from one to the value stored in the public variable.


谢谢。我已经要求复制的数量,所以我把它作为另一种形式的变量。因此,我将公开并将其传递给报告并尝试创建一个计数器。


我不知道计数器是否每次都会清除报告的副本打印但是我会尝试一下让你知道。

Thanks. I already ask for the number of copies so I have that as a variable in another form. So I will make it public and pass it along to the report and try and create a counter.

I don''t know if the counter will clear each time a copy of the report is printed but I will give it a try and let you know.


我还没有想过这个,但有两件事立即浮现在脑海中。


首先,您需要创建一个公共变量来保存要打印的总份数。用户在发送打印时必须输入的值。


其次,您需要查看在报告的打印过程中创建某种循环。然后以某种方式从一个增加到存储在公共变量中的值。
I haven''t really thought about this but two things immediately pop to mind.

First one is that you will have to create a public variable to hold the total number of copies to be printed. A value which will have to be entered by the user when sending to print.

Secondly, you will need to look at creating some kind of loop in the on Print procedure of the report. Then somehow increment from one to the value stored in the public variable.


好的,我试过传递变量,但它不起作用。我想我弄清楚了为什么以及是否有人能想出更好的方式我会很感激。


我从表单中打开我的报告但设置了这样的副本数量
Ok I have tried passing variables and it won''t work. I think I figured out why and if anyone can figure out a better way I would appreciate it.

I open my report from a form but set the number of copies like so
展开 | 选择 | Wrap | 行号


这篇关于如何在报告中显示副本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆