打印同一报告的多个副本 [英] print multiple copies of the same report

查看:57
本文介绍了打印同一报告的多个副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一份报告,我需要复印两份不同的标签。我已经设置了一个表格,其中包含0-10的数字(0表示原始而其他所有人都得到复制)。 IIF更改了标题 - 所以现在一切正常。


问题是:当用户按下一个品脱按钮时,会弹出一个小表格,要求打印份数(我的意图)是从表中打印0 +份数,所以如果选择2份,我们将获得1份原件+ 2份)..

如果用户写了2份,会发生什么我把所有的桌子都打印了两次,如果我在桌子上有10个号码,我得到2个原件+20份。


请问那些代码是什么?


谢谢。

I have a report which I need to copy in 2 different lables. I''ve set a table with numbers from 0-10 (0 gets "original and all the others get "copy"). The caption is changed by IIF - so now all is ok.

The problem is : when users presses a pint button, a small form pops up asking number of copies to print (my intention is to print from the table the 0 + the number of copies, so if chosen 2 copies, we''ll get 1 original + 2 copies)..
What happens is that if user writes 2 copies'' I get all table printed twice )if I have 10 number in the table, I get 2 original + 20 copies.

What w''d be the code for that please?

Thanks.

推荐答案

当你有A2003或更高版本时,可以通过代码处理几个打印选项,但A2000需要一些硬的东西很难编码。


我可能会指导用户,当他们顽固时,请考虑触发弹出窗体,并警告不要更改副本数量。


Nic; o)
When you have A2003 or higher, then several print options can be handled by code, but A2000 needs some "hard" and difficult coding.

I would probably instruct the users and when they are stubborn think about triggering a Popup form with a warning not to change the number of copies.

Nic;o)


非常感谢。

因为我已经使用了代码,所以我很感激你看看我做错了什么并修好了 - 如果可能的话请?


代码:
Thanks for that.
As Im already using a code, I''d appreciate if you''d see what am I doing wrong and fix it - if possible please?

The code :

Private Sub PRINTREP_Click()

On Error GoTo Err_PRINTREP_Click


Dim strDocName As String

Dim numCopies As Integer

Dim strLinkCriteria作为字符串


strDocName =" RPT_INVOICE"


strCriteria =" [invoice_no] =" &安培;表格![FRM_INVOICE]![INVOICE_NO]


numCopies =我![复制]


DoCmd.SelectObject acReport,strDocName

DoCmd.PrintOut acSelection ,,,, numCopies

DoCmd.CLOSE acReport,strDocName


Exit_PRINTREP_Click:

退出Sub


Err_PRINTREP_Click:

MsgBox Err.Description

恢复退出_PRINTREP_Click


结束Sub
Private Sub PRINTREP_Click()
On Error GoTo Err_PRINTREP_Click

Dim strDocName As String
Dim numCopies As Integer
Dim strLinkCriteria As String

strDocName = "RPT_INVOICE"

strCriteria = "[invoice_no]= " & Forms![FRM_INVOICE]![INVOICE_NO]

numCopies = Me![COPY]

DoCmd.SelectObject acReport, strDocName
DoCmd.PrintOut acSelection, , , , numCopies
DoCmd.CLOSE acReport, strDocName

Exit_PRINTREP_Click:
Exit Sub

Err_PRINTREP_Click:
MsgBox Err.Description
Resume Exit_PRINTREP_Click

End Sub



我![copy]是用户说出他感兴趣的副本数量的地方 - 这就是问题所在。


希望你能协助。

The me![copy] is where user states number of copies he''s interested in - and there''s the problem.

Hope you can assist.


我不知道num拷贝。 DoCmd.PrintOut的参数。

我希望这段代码:
I don''t know the "num copies" parameter of the DoCmd.PrintOut.
I would expect this code:
展开 | 选择 | Wrap | 行号


这篇关于打印同一报告的多个副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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