report print preview opens behind menu

madwoman

Registered User.
Local time
Today, 00:53
Joined
Oct 20, 2005
Messages
20
I have inherited a database which originally did a direct print output when a menu item was selected. However we really need the report to appear in PrintPreview rather than print out directly as we need to be able to export the data to a file before the print output is generated. The current code for this routine is
Private Sub Submissions_By_Estimator_Click()
On Error GoTo Err_Submissions_By_Estimator_Click

Dim stDocName As String

stDocName = "Rpt Submissions By Estimator"
DoCmd.OpenReport stDocName, acNormal

Exit_Submissions_By_Estimator_Click:
Exit Sub

Err_Submissions_By_Estimator_Click:
MsgBox Err.Description
Resume Exit_Submissions_By_Estimator_Click

End Sub

And I have tried amending it so that the acNormal is replaced by acViewPreview and this does generate a print preview of the report, however the report appears behind the main menu screen and I can't access it to export the data or manually print it out - how do I get the report to be the active window rather than it running behind the main menu?
 
make its popup property to yes
 
many thanks, that's great
 

Users who are viewing this thread

Back
Top Bottom