在Access中,如何将多个报告转换为1个PDF文件? [英] In Access, How to Convert Multiple Reports to 1 PDF file?

查看:79
本文介绍了在Access中,如何将多个报告转换为1个PDF文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加一个控制按钮,将1个所选记录的所有报告转换为按页面顺序打印为1 pdf文件。有一个控制按钮可以为每个选定的记录打印1份完整报告,但有些用户希望将报告pdf通过电子邮件发送给客户。对于PDF报告按钮的On Click事件过程,VBA编码是什么?或者宏会更好吗?我是VBA& amp;的初学者。宏如此基本的解释/编码会有所帮助....谢谢!

I want to add a control button to convert all reports for 1 selected record to print in page order as 1 pdf file. There is a control button to print 1 full report per selected record but some users will want to pdf the report to email to clients. What would the VBA coding be for the On Click Event Procedure for the PDF Report button? Or would a macro be better? I am a beginner with VBA & macros so elementary explanations/coding would be helpful....Thank you!

推荐答案

可以使用其中任何一个,但我会选择VBA 。


如果你想使用宏,请使用OutputTo。行动。选择报告作为对象类型并选择报告名称。


如果你想使用VB
You can use either but I would go for VBA.

If you want to use macro, use the "OutputTo" action. Choose report as Object Type and select the report name.

If you want to use VB
展开 | 选择 | 换行 | 行号


是的,但是我是否需要列出所有报告名称?每1个中有23个单独的报告按页面顺序记录为单个pdf文件...因此用户可以保存pdf,即One Montgomery Audit'....
Yes, but do I need to list all the report names? There are 23 individual reports per 1 recored to be a single pdf file in page order...so the user can save the pdf ie as ''One Montgomery Audit''....


呜!这是有效的,除了pdf文件显示所有记录,我只需要从下拉列表中选择1条记录。除非选择审核,否则用户无法输入数据,预览或打印或pdf ...这是我的代码,但可以添加所有rpt nams ...


Private Sub btnPDF_Click ()

如果Audit_Dte_ID = 0那么

MsgBox"没有选择audidt"

退出Sub

结束如果

DoCmd.OutputTo acReport,rpt1aAuditorinfo,acFormatPDF ,,,


结束子

---- -


我如何编码,因此pdf只是选定的审计记录?
Wooh! That worked except the pdf file is showing all the records and I need just 1 record selected from a drop down list. The user cannot enter data, preview or print or pdf unless an audit is selected...This is the code I have but wiill add all the rpt nams...

Private Sub btnPDF_Click()
If Audit_Dte_ID = 0 Then
MsgBox "No audidt has been selected"
Exit Sub
End If
DoCmd.OutputTo acReport, "rpt1aAuditorinfo", acFormatPDF, , True

End Sub
-----

How do I code it so pdf is only the selected audit records?


这篇关于在Access中,如何将多个报告转换为1个PDF文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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