Saving pdf files, Using Access 2007

I need to automatically save each file based on the account number, to a separate pdf file type.  I need to dump these pdf files to a directory on my external drive.  I already have the report created.  Any help is appreciated.
Delores_CAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jerryb30Commented:
Is this a report? So one PDF for each record?
0
Delores_CAuthor Commented:
Yes
0
Jeffrey CoachmanMIS LiasonCommented:
It is not clear if you already have a system to loop all "Account Numbers"
It is not clear if the Account number is text or a number...
It is not know the name of the table that holds the accounts...
It is not clear if you have the addin loaded for creating PDF...
It is not clear if this report is for the account (Parent) or for all the Child records (transactions, Balances, statements, ...etc)
the path to your external drive
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Jeffrey CoachmanMIS LiasonCommented:
...so my guess here is (based on your experience here), is that you just need the basic code...
Here is an example:

Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tblAccounts")

rst.MoveFirst

Do Until rst.EOF
    DoCmd.OutputTo acOutputReport, "rptAccounts", acFormatPDF, "D:\YourFolder\Acct_" & rst!AccountNumber & ".pdf"
    rst.MoveNext
Loop

rst.Close
Set rst = Nothing

;-)

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jerryb30Commented:
I don't think Access 2007 needs an add-in to do PDF.
Jeff, I think your code would create multiple copies of the same report.  Which included all records.

How do you call your report? From a query?
0
jerryb30Commented:
Just guessing until I get my other PC working:
Building on Jeff's code.
Do Until rst.EOF
   DoCmd.OpenReport "rptAccouts", acViewReport, , "Account = '" & rs!AccountNumber & "'"
    DoCmd.OutputTo acOutputReport, "", acFormatPDF, "D:\YourFolder\Acct_" & rst!AccountNumber & ".pdf"
    rst.MoveNext
Loop
0
Jeffrey CoachmanMIS LiasonCommented:
<I don't think Access 2007 needs an add-in to do PDF.>
It did originally, not sure if it still needs it in the most recent service pack though...
http://www.microsoft.com/en-us/download/details.aspx?id=9943

<Jeff, I think your code would create multiple copies of the same report.  Which included all records.>
;-)
Yep I missed that, thanks for the follow up...
;-)

Jeffcoachman
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.