Make a date from and date to on a form and configure your report to work between them, make a button with the following on-click event:
Code:
Private Sub Command25_Click()
On Error Resume Next
DoCmd.OutputTo acOutputReport, "ReportName", "PDFFormat(*.pdf)", , False, , , acExportQualityPrint
On Error Resume Next
End Sub
Make a date from and date to on a form and configure your report to work between them, make a button with the following on-click event:
Code:
Private Sub Command25_Click()
On Error Resume Next
DoCmd.OutputTo acOutputReport, "ReportName", "PDFFormat(*.pdf)", , False, , , acExportQualityPrint
On Error Resume Next
End Sub
I have a date from and date to on a filter for, but when I press button "Save to PDF" it save all records, not just selected dates and workers.
Here it is....
There is an odd issue in access with filters and the like only working when you open the report, not when you export it. I would put the date from and to in the data source of the report as date betweens.
arnelgp, I saw this option on ribbon menu (PDF or XPS), but I want to be closed this menu in access. I want my workers just to press buttons, I mean to be
easiest for them
There is an odd issue in access with filters and the like only working when you open the report, not when you export it. I would put the date from and to in the data source of the report as date betweens.
That's work perfect, Tieval! Than you! Тhank you too arnelgp!
Now I notice there is only date filtering but i want to add and cbo filtering 2 criteria.
And now on pressing button "Report" the report open in Print Preview with this code: DoCmd.OpenReport strReport, lngView, , strWhere,
I want to open report in normal "ReportView" to add button
What I have to change in the code - DoCmd.OpenReport strReport, lngView, , strWhere ?