Hi,
I have created an application where users can add to a patient's physical observation records which is done through a form. Once they save the new record i want to automatically open a report of all previous physical observations for that patient, go to the last page of the report and print it out.
I have already created the query and the report to show physical obervations for the selected patient which works fine.
But rather than have the user navigate to the last page of the report, access the print dialog and select page 3 of 3 for printout i want the last page automatically sent to the printer (i'm not concerned as to whether the report is visible or not during this process).
So far i have managed to get the report to go to the last page by using the following code:
Private Sub Report_Open(Cancel As Integer)
SendKeys "{End}"
End Sub
But how do i print this last page programmatically.
I guess ideally i would like this to all happen in the background so that once and new record has been added and the save button has been pressed all the user has to do is go the printer and collect the 1 page report.
Any help would be appreciated.
I have created an application where users can add to a patient's physical observation records which is done through a form. Once they save the new record i want to automatically open a report of all previous physical observations for that patient, go to the last page of the report and print it out.
I have already created the query and the report to show physical obervations for the selected patient which works fine.
But rather than have the user navigate to the last page of the report, access the print dialog and select page 3 of 3 for printout i want the last page automatically sent to the printer (i'm not concerned as to whether the report is visible or not during this process).
So far i have managed to get the report to go to the last page by using the following code:
Private Sub Report_Open(Cancel As Integer)
SendKeys "{End}"
End Sub
But how do i print this last page programmatically.
I guess ideally i would like this to all happen in the background so that once and new record has been added and the save button has been pressed all the user has to do is go the printer and collect the 1 page report.
Any help would be appreciated.