I am trying to use a print command button on a form to offer the user the capability to preview a report, to preview a report and then print it or print the report immediately without preview.
I have use acPreview option of OpenReport using DoCMD to show the preview dialogue but I have not found a way to then go on to print the report if the user so wishes.
Here is my basic code
strDocName = "repFinal"
strSQL = "FinalReview.DevtId =" & Me.txtDevtId
DoCmd.OpenReport strDocName, acPreview, , strSQL
DoCmd.SelectObject acReport, strDocName
DoCmd.RunCommand acCmdPrint
This displays the Print selection dialogue over the preview - not so clever.
I am happy to prompt the user to confirm he wishes tp preview first but can't seem to turn preview into a select print option.
Any offers - many thanks.
I have use acPreview option of OpenReport using DoCMD to show the preview dialogue but I have not found a way to then go on to print the report if the user so wishes.
Here is my basic code
strDocName = "repFinal"
strSQL = "FinalReview.DevtId =" & Me.txtDevtId
DoCmd.OpenReport strDocName, acPreview, , strSQL
DoCmd.SelectObject acReport, strDocName
DoCmd.RunCommand acCmdPrint
This displays the Print selection dialogue over the preview - not so clever.
I am happy to prompt the user to confirm he wishes tp preview first but can't seem to turn preview into a select print option.
Any offers - many thanks.