use field value as a pdf filename

ppsandy

New member
Local time
Tomorrow, 06:56
Joined
Oct 9, 2008
Messages
8
I have "Access 2003" & "PDF Creater" installed and it can help me to save the report's pages in single pdf file. Now, I have to save the filename with the report field value (e.g. customerid + receipt_no)!! Anyone can help me PLS!!
 
How do you run the pdf creator in code, if it is similar to this, then you can use variables into the filename. Here is an example from a different pdf creation program, but may be similar:

Code:
Call RunReportAsPDF("rptReportName", stPath & "PDFFileName" & stCustID & streceiptno & ".pdf", , PrintChoice)
Otherwise you could do the rename after the file is created:

Code:
' "Rename the report" to the final file name
Name pdfsourcename As pdfsourcename & stCustID & stReceiptNo
If the ID and Receipt are on a form, then you can use forms!nameofform!ID rather than stCustID

ID would be changed to the object name such as txtID if that is what you call your text box containing the ID.
 

Users who are viewing this thread

Back
Top Bottom