Good Monday everyone!
I am pressing the button, Report gets generated and now I need to have it saved in C: in PDF format.
I have Distiller and set referrenses to it.
I use to use DoCmd..and it worked.
So far the simpliest I found is
Dim sCaption as String
sCaption = “SomeFileName.pdf”
DoCmd.OpenReport “ReportName”, acViewPreview, “Filter”, “Where Clause”
Reports!ReportName.Caption = sCaption
DoCmd.PrintOut
DoCmd.Close
However this one is not finding the name of the Report…which is there.
I am assuming something is missing. I do not get this “Filter”, “Where Clause”
I would appreciate simple one liner code.
Seems like it is not used anymore, everytihng got too complex.
And if possible, please, when Report is blank due to the wrong parameters selected – I would like a message ‘Please, select correct parameters’
Much appreciate your helping me.