By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

Access Report to multiple PDF files

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.