Help open the Report and save it in PDF format

GaDauBac

Member
Local time
Tomorrow, 03:44
Joined
Mar 22, 2021
Messages
42
I have 1 database:
- I want to open a Report and need it to display in PDF format, and save it in PDF format with a common path with the database file.
Please guide and help. Attached is my database file.
Thank you so much everyone!
 

Attachments

This command is what I use to make a PDF out of a report.

Code:
        tK2 = sgDBDevFld & "Family_List_" & tK1 & ".PDF"
...
        DoCmd.OutputTo acOutputReport, "FamilyList", acFormatPDF, tK2

The "FamilyList" is the name of the report object. tK2 is the name of the PDF output file (as you can see, including .PDF as the file type.) tK1, which is used to define tK2, is a person's name with spaces removed because this was a genealogy project. sqDBDevFld is a device/path specification, which in your case could contain your DB path. (In my case, it actually didn't, but my needs and yours are different.)

The part about opening the report IN PDF is trickier because the report is an Access report. So to do that, you have to actually create the .PDF first and then open the file via a hyperlink.
 
check the code of your button.
Thank you very much for your help with great understanding!
- I want that the name of the PDF file will be:
"SoHD" & "/HD-QCNB-" & "dd,MM,yyyy" & "hh,mm".PDF
Example: 0006/HD-QCNB/07062001-1608.PDF
- The folder where the file is saved also opens automatically.
Thank you!
 
you can't use "/" and "," in your filename.
Sorry I bothered you again
I want it to save to "HDkiemPXK" folder but do many times without success. Can you help me again?
Thank you.
 

Attachments

Users who are viewing this thread

Back
Top Bottom