473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Report to multiple PDF files

Hello-

I need to create multiple PDF files from one access report that breaks
on client for approx. 20 clients. Any suggestions? Thanks!

Jan 6 '06 #1
3 2699
You will need to understand how to work with recordsets in VBA to achieve
this.

OpenRecordset() on a SQL statement that gives you one client per record.

Loop until EOF, using an OpenReport to fire the report off to Distiller or
whatever you use to create the PDF, using a WhereCondition so that the
report contains the info that relates to the client in the loop.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<gr******@alltel.net> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hello-

I need to create multiple PDF files from one access report that breaks
on client for approx. 20 clients. Any suggestions? Thanks!

Jan 6 '06 #2
Thanks, Allen.

Could you comment on this code and it's problems?

__________________________________________________ __________

Dim Recordset as rs1
DocName = "rptBranchPromo"
strOutPutFile = GetIniSetting(PDF, "Parameters", "Output File")

Do Until rs1.EOF
strPDFFile = "\\infistar1\dfs\cardmgtfinance\output\" &
rs1!ClientID & ".pdf"
Result = RPT_CreateSingleFile(DocName, strPDFFile,"PDF","WHERE
ClientID='" &
rs!ClientID & "'")
rs1.MoveNext
Loop
__________________________________________________ _________________

Thanks!

Jan 7 '06 #3
Cannot really comment on the problems without knowing what the problems are.

You declared rs1 as a recordset, but did not assign anything to it.

RPT_CreateSingleFile() is not one of the built-in Access functions. Perhaps
it is part of another library, or a custom function.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<gr******@alltel.net> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Thanks, Allen.

Could you comment on this code and it's problems?

__________________________________________________ __________

Dim Recordset as rs1
DocName = "rptBranchPromo"
strOutPutFile = GetIniSetting(PDF, "Parameters", "Output File")

Do Until rs1.EOF
strPDFFile = "\\infistar1\dfs\cardmgtfinance\output\" &
rs1!ClientID & ".pdf"
Result = RPT_CreateSingleFile(DocName, strPDFFile,"PDF","WHERE
ClientID='" &
rs!ClientID & "'")
rs1.MoveNext
Loop
__________________________________________________ _________________

Thanks!

Jan 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
13
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
5
by: enginerd477 | last post by:
I am having trouble getting my database to do what i want. I have a form with autonumbers which are going to be the numbers of some inventory. the inventory has reports in word or other program. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.