PDF printer for Report

S

Simon

I create a invoice in a report that i then print out, i would also
like to save a copy to the Pc using the PDF printer thati have.

If i click on the pdf printer it then lets me save it with a file name
of what the report is called. rptInvoice

Is there a way to get access to atomatical save the file as the order
number that is showen on the invoice

any help would be great


Thanks
 
G

Guest

Hi Simon,

I believe you can do this by using VBA code to programmatically set the
report's caption to include your invoice number. I have not tested it with
exporting to the .pdf format, but it does work when exporting to the
Microsoft Access Snapshot (*.snp) file format. Here is an example of setting
the report's caption in the activate event procedure. When I programmatically
export the report as a .snp file, the strBoeingEquipID, a field that is in
the report's record source, is included in the filename:

Option Compare Database
Option Explicit

Private Sub Report_Activate()
On Error GoTo ProcError

' The caption is used for the Snapshot filename (caption.snp)
Me.Caption = strServiceRequested & " Request for " & strBoeingEquipID
DoCmd.Maximize

ExitProc:
Exit Sub
ProcError:
MsgBox "Error: " & Err.Number & ". " & Err.Description, , _
"Error in Report_Activate event procedure..."
Resume ExitProc
End Sub


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
A

Albert D. Kallal

Better to use Stephans here

http://www.lebans.com/reporttopdf.htm

The advantage of the above:

1 - it is 100% free
2 - you don't have to install a pdf printer
3 - you don't have to install any extra software
4 - to create a pdf, you don't have to switch printers
5 - you can specify a output file (pdf) name.

The list is actually longer then the above..but, you get the idea...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top